Fieldgroups with accordion?

4 months 1 week ago #323123 by ericmuc
Fieldgroups with accordion? was created by ericmuc
I have the problem, that I have some field groups with about 10 fields in it. By adding for example 5 groups, editing of this is difficult, because you have to scroll down very long and have to search the right entry.
A solution is, to have an accordion.
Is there an easy way to have the first field of a field group as the accordion title and the rest as the accordion content? With standard editing view with div?

My current solution is to add html in the group field edit view as for example (Uikit, also with bootstrap possible)
<ul uk-accordion><li>
<a class="uk-accordion-title" href="#">
<div class="uk-accordion-content">
and so on
But if I add a new field group, the content of [cb_field] is the same of the field group before. So this I cannot use.

Thanks, best regards

Please Log in to join the conversation.

4 months 5 days ago #323140 by krileon
Replied by krileon on topic Fieldgroups with accordion?
There's no accordion template for CB Field Groups. It comes with several pre-made templates like Table, etc.. that you can use. If you want an accordion template you'd have to implement that yourself as a template. I don't think you'll be able to do this with the "Custom Display Rows" parameter as that only allows replacing a rows output while an accordion HTML structure would require surrounding HTML around all the rows. You can find the template files at the below location.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: ericmuc

Please Log in to join the conversation.

4 months 5 days ago #323158 by ericmuc
Replied by ericmuc on topic Fieldgroups with accordion?
Thanks, only to let you know:
I managed it with the "Custom Display Rows" parameter. I set the accordion title also as [field_cb_fieldname] and the accordion content are the other fields. So in this way I have a solution, which works for me.

Best regards
The following user(s) said Thank You: krileon

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.415 seconds

Facebook Twitter LinkedIn