Home › Forums › Add-ons › Repeater Field › Loop thru Users and Repeated Field › Reply To: Loop thru Users and Repeated Field
You cannot use acf_form() for this. The reason is that you want to have a single form that updates a field but multiple user. Well, you may be able to use acf_form(), but either way you need a custom form for this page.
There are many steps. Basically to use acf_form() you would need to create a field group that is used only on this page that has the repeater. You would need to create a filter for the repeater field, I’m not sure right now if it should be acf/load_value or acf/prepare field.
The you would need to create an acf/pre_save_post filter that reads through the submitted repeater field and updates each user accordingly and then somehow prevents ACF from updating the values. Alternatively to the pre_save_post filter you could set up the acf form to save the values to an options page and then use an acf/save_post filter to read through the repeater and update the user fields.
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.