I have a repeater that is a list of Post Object & Date Picker pairs. I basically want to replicate the repeater UI that exists in the admin section – I want the user to be able to drag to reorder the repeater items from the front end via a jQuery sortable list. For instance:
Stored repeater item order:
1
2
3
User reorders to:
2
3
1
On save, I want to make an ajax call to a function that will save the repeater items in the updated order while preserving the row data.
Is there a straightforward way to replicate what ACF is doing in the backend when a repeater is re-ordered? Can I update the order of the existing items as stored in the repeater field without overwriting the data with a new array?