Home › Forums › Add-ons › Repeater Field › Collapsed repeater can't pick up a field to display from cloned object
Hi,
if I put a Cloned CF in a Repeater, the repeater can’t find fields to use for the collpased state (it just sees the clone field which of course has no data itself). It would be good if it could find at least one level of subfields to use for the collapsed state
thanks
J
This is due to the way that the clone field works. The best advice I can give you is to submit a support ticket https://support.advancedcustomfields.com/new-ticket/
I was having the same issue because I am using cloned field groups quite heavily. But I discovered a work around.
1. Set the Collapsed field value in the Repeater to your cloned field.
2. In your cloned field group add the class “-collapsed-target” to the field you want to show when the repeater is collapsed.
3. Enjoy.
Also, if you have multiple fields per row, one (or more) of which you want to display when the repeater is collapsed, add the “-collapsed-target” class to ALL the fields you want displayed. Just make sure they don’t add up to more than 100% width. I do this with a Person repeater where I show the First Name and Last Name when the repeater is collapsed.
This is definitely a hack, but for now it works.
thanks @kensyntric-com I think that this work around is probably the best that’s going to happen, so the information is good.
Hey people, any news here? I tried @kensyntric-com’s workaround, but no success 🙁 My repeater (grandfather) includes a clone (father) which includes another clone (child).
The child one has 5 sub-fields
True/false
Image
Group containing
Text
Number
Textarea
The father has
Title
Subtitle
Clone (child)
And the grandfather only repeats father.
I would like to collapse father and show its titles, collapse child and show its Text (inside group), but I couldn’t find a way to do so, any ideas?
Cheers!
I abandoned the cloned fields because I needed more than just field values to show in each row. I now have links to view and edit each object, custom checkbox…the kitchen sink. I am now using custom WordPress admin lists, basically the equivalent of the Pages, Posts or Users list with filters, inline editing, sorting, etc.
If you get stuck and want to know details I’d be happy to share some code. Sorry I’m no help.
The topic ‘Collapsed repeater can't pick up a field to display from cloned object’ is closed to new replies.
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.