Home › Forums › Add-ons › Repeater Field › Add Row to Nested Repeater Field › Reply To: Add Row to Nested Repeater Field
Hey thanks Elliot, I’ve figured this out, however, now I am trying to figure out how to remove a nested repeater row. It seems simple enough using code like:
do_action('acf/delete_value', 101, 'causes_1_cause_id' );
Doing this removes the field from the database, however, it does not update the count field in the database and it does not decrease each subsequent row number by one. As you can see, running the code above results in the table looking like the screenshot below:
causes should have been changed to 2 and
(_)causes_2_cause_id should have been changed to
Is there a built-in function that will allow me to do this, or some direction on how to accomplish it?
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!
❓Ever wondered when and why ACF uses JSON instead of the database? Check out our summary of the most recent session of ACF Chat Friday for the answer, and make sure to register for the next session.— Advanced Custom Fields (@wp_acf) February 23, 2023
© 2023 Advanced Custom Fields.