Home › Forums › Backend Issues (wp-admin) › Sort on repeater field in admin › Reply To: Sort on repeater field in admin
In order for the repeater to be sorted in the admin, you will actually need to update the field so that it is sorted. You can probably do this with an acf/update_value filter https://www.advancedcustomfields.com/resources/acfupdate_value/.
add_filter('acf/update_value/name=my_repeater_field', 'my_sort_repeater_function', 10, 3);
function my_sort_repeater_function($value, $post_id, $field) {
// sort repeater array
return $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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.