Support

Account

Home Forums ACF PRO Please make the Repeater collapse icon available Reply To: Please make the Repeater collapse icon available

  • Actually, you are 100% correct. I just did some testing. It appears that there is a bug in the system that let me do this, and it is a bug that works for all layout types for repeaters.

    Steps to recreate
    1) Create a text field in the repeater, doesn’t matter what you call it
    2) Set this field as the field to show
    3) delete the field you just created and selected
    4) save the field group

    This needs to be repeated whenever you modify the field group, and it’s probably not a good idea to depend on bugs, but I’m guessing that this one isn’t going to be corrected any time soon, especially if no one reports it since it not breaking anything.

    I was curious, so I did some testing. Hack #2, add a load field filter to any repeater field.

    
    	add_filter('acf/load_field/name=my_repeater', 'make_it_collapse');
    	function make_it_collapse($field) {
    		$field['collapsed'] = 'field_whatever';
    		return $field;
    	}