Home › Forums › Add-ons › Repeater Field › Can you update a row in a repeater? › Reply To: Can you update a row in a repeater?
I’m having the same issue…sorta. I have the following field defined:
Through code, I am filling out the values of the repeater like so:
$emergency_contact = array('emergency_contact_full_name' => $EMERGENCY_CONTACT_FULL_NAME, 'emergency_contact_relationship_to_you' => $EMERGENCY_CONTACT_RELATIONSHIP, 'emergency_contact_phone' => $EMERGENCY_CONTACT_CONTACT_PHONE ); update_field('volunteer_emergency_contact', $emergency_contact, $theId);
No errors when that code runs.
But when I try to load the CPT entry, WordPress just hangs and nothing happens. If I remove that line where the code gets updated, everything works just fine.
Am I supposed to create something to update the row in the repeater beforehand? Am a bit confused.
Thanks in advance!
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!
The most recent ACF Chat Friday featured a live demo of how to register CPTs directly in the plugin, one of our most requested features. Check out the summary below for a replay of the demo, and don’t forget to register for the next session! https://t.co/k2KQ3WWBAz— Advanced Custom Fields (@wp_acf) March 9, 2023
© 2023 Advanced Custom Fields.