Skip to Content Skip to Menu

Fieldgroups with accordion?

  • ericmuc
  • ericmuc
  • OFFLINE
  • Posts: 390
  • Thanks: 30
  • Karma: 2
  • Add-ons
3 years 8 months ago #323123 by ericmuc
Fieldgroups with accordion? was created by ericmuc
Hi,
1)
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?

2)
My current solution is to add html in the group field edit view as for example (Uikit, also with bootstrap possible)
Code:
<ul uk-accordion><li> <a class="uk-accordion-title" href="#"> [cb_field]</a> <div class="uk-accordion-content"> [title_cb_field][field_cb_field] and so on </div> </li> </ul>
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
Eric

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48424
  • Thanks: 8274
  • Karma: 1443
3 years 8 months 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.

/components/com_comprofiler/plugin/user/plug_cbfieldgroups/templates


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 or Create an account to join the conversation.

  • ericmuc
  • ericmuc
  • OFFLINE
  • Posts: 390
  • Thanks: 30
  • Karma: 2
  • Add-ons
3 years 8 months ago #323158 by ericmuc
Replied by ericmuc on topic Fieldgroups with accordion?
Hi,
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
Eric
The following user(s) said Thank You: krileon

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum