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?
I finally have the solution (which works for me, but I think most people can use this)… and it was so easy (in hindsight).
The only thing you need to do is remove the class order from the field.
Since I add an extra class to the repeaters I don’t want users to move, it was fairly simple to limit it to these repeaters.
jQuery(document).ready(function() {
jQuery(".disable-sorting table.acf-table td.order").removeClass("order");
});
If you want it done on all your repeaters, just remove the class .disable-sorting
.
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.