Home Forums ACF PRO Write only repeater field Reply To: Write only repeater field

  • This is something that I did recently. The client has a repeater that they can add to, but they cannot remove entries or edit existing one. I did this by adding custom JS and my JS is below. Unfortunately it will not prevent them from dragging and dropping rows to change the order, I’m don’t know how to do that. There seems to be a solution to that here

    jQuery(document).ready(function($) {
    	if (typeof(acf) == 'undefined') {
    	var repeaters = [
    	var selectors = [];
    	for (i=0; i<repeaters.length; i++) {
    		selectors[selectors.length] = '[data-key="'+repeaters[i]+'"] .acf-row';
    	var selector = selectors.join(', ');
    	$(selector).each(function(index, element) {
    		if ($(element).hasClass('acf-clone')) {
    		$(element).find('.acf-input input').attr('readonly', true);