Home › Forums › Add-ons › Repeater Field › Add Row to Nested Repeater Field › Reply To: Add Row to Nested Repeater Field
Currently, the update_function will override the current value completely, which makes adding a row a bit of a hastle.
You will have to use the get_field function to load the entire repeater (parent repeater) and then add your new row to the nested repeater.
So, using the name of the list, you could get the parent repeater, loop through the rows and when you match the list name to that row’s list name value, you can then add to the corresponding causes.
Then, use the update_value function on the updated value.
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!
🤔 Curious about the ACF user experience? So are we! Help guide the evolution of ACF by taking part in our first ever Annual Survey and guarantee you’re represented in the results. https://t.co/0cgr9ZFOJ5— Advanced Custom Fields (@wp_acf) May 8, 2023
© 2023 Advanced Custom Fields.