Home › Forums › ACF PRO › How to disable drag&drop ordering function on a specific Repeaters field? › Reply To: How to disable drag&drop ordering function on a specific Repeaters field?
Hi @golewis
> how you added the JS file?
Here is an instruction from ACF guys.
https://www.advancedcustomfields.com/resources/adding-custom-javascript-fields/
Also U better wrap javascript above with this code below avoiding JS error.
if (typeof acf !== 'undefined') {}
PS
These codes below colorize the handle + replace title attribute.
setTimeout(function(){
var target = $('.disable-sorting > .acf-input > .acf-repeater > .acf-table > tbody > .acf-row > .acf-row-handle.order');
target.css( {'cursor':'default', 'background-color':'#feffe5'} ).attr('title', 'Ordering disabled');
}, 200);
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.