Home Forums ACF PRO Write only repeater field


Write only repeater field

  • Hi, is there a way to make the repeater field write only?
    I’d like the editors to be able to leave notes in a repeater field for each other but I don’t want them to be editable or removeable.

  • 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);
  • EDIT: Sorry, wrong post!

    That’s the one. Okay, so I assume I’d be replacing:

    $(element).find('.acf-input input').attr('readonly', true);

    with something like:

    $(element).find('div[data-name="FIELD_NAME_HERE"] input').attr('readonly', true);


    Well that’s better than what I had originally, so thank you. Shame there’s no unique ID field available to repeaters!

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Write only repeater field’ is closed to new replies.