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;
}
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.