Home › Forums › Bug Reports › Repeater + conditional logic losing content when adding/rearranging rows › Reply To: Repeater + conditional logic losing content when adding/rearranging rows
To add to the above, I thought it might help to post up some images showing the problem. I decided to use a text field instead of a WYSIWYG editer, to keep the images compact and clear.
To begin with, I create 5 rows, each containing a c-logic checkbox and a text field. The checkbox determines whether the text field is visible or not. I save/update the page and the result looks like this:-
I then uncheck the checkboxes to hide the text fields and update the page again:-
Then, I insert a new row between rows 2 and 3 and populate the new text field with “new row” :-
Now, if I press update and then make all the rows visible, I get the following:-
As you can see, the rows and their data have not moved down as expected. Row 3 has been wiped and replaced with the new row.
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.