I have a front end form that adds to a repeater. The repeater has first name, last name, email, checkbox, and a text field. On the front end form I only want to display the first three fields. Currently I’m using CSS to hide the fields but that doesn’t allow me to make those fields required (I use the same form on a different page where those hidden fields are displayed and updated).
When I restrict the fields displayed by adding 'fields' => array('field_5a21a84ddb30b', 'field_5a21a8a3db30c', 'field_5a21a8aedb30d'), it no longer allows me to add more items to the repeater. It just displays the last values submitted and allows me to edit it.
Ideally when this page loads I’d like to show a blank form that allows someone to add to the repeater upon submit, but I could also work with showing all the repeater items if I can limit it to only the first three fields.
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.