Home › Forums › Add-ons › Repeater Field › Disable reordering of the repeater field items › Reply To: Disable reordering of the repeater field items
Hey @hube2 Thanks a lot!! 🙂
It’s funny because I just found the same solution :-))
Here is what I got:
(function($) {
jQuery( document ).ready( function( $ ) {
if ( typeof acf !== 'undefined' ) {
acf.addAction('load_field', function( field ) {
if ( field.data.name === 'locations') {
const locationsField = field.$el[0];
const acfTable = locationsField.querySelector('.acf-table');
const acfTableRows = acfTable.querySelectorAll('.acf-table .acf-row');
acfTableRows.forEach((row, index) => {
const handle = row.querySelector('.acf-row-handle');
handle.classList.remove('order');
});
}
});
}
});
})(jQuery);
I will have a look at what you did as well…
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.