Home › Forums › General Issues › Limit displayed fields on acf_form for Repeater › Reply To: Limit displayed fields on acf_form for Repeater
In this case, I think it makes sense to use two separate forms: one with the 3 fields you need on one page, and another form with all the repeater fields on the other page. You could still have those save to the same place — in your case to a user.
Alternatively, if you need to use the same form for both pages you might have to disable the ‘required’ fields in ACF and then use some front-end validation like jQuery validate: https://jqueryvalidation.org
While a bit hacky, you could then add ‘required’ asterisks to your fields in your theme after the field label: <span class="required">*</span>
If it isn’t possible to edit the form label html directly you could use jQuery to append them or with css using the :after
pseudo selector.
I don’t see any disadvantage to creating two forms in this case.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.