Group Field Output using CB Substitutions

3 years 5 months ago - 3 years 5 months ago #320989 by bizguy
I am trying to our put CB User Field Group data using substitutions. Unfortunately
www.joomlapolis.com/documentation/18353-using-substitutions-throughout-cb
doesn't address outputting Field Group data, or how to apply any formatting that is allowed.
I was able to output the raw data in the Field Group, by creating a separate tab, placing the group and fields in the tab, then outputting the tab, but the data is not formatted using
[cb:usertab tab="TAB_ID" user="REPLACEMENT" /]
as all the field options selected are output as one string.

Is there a way to access the individual items, or format the output?

Thanks,

Ed

Please Log in to join the conversation.

3 years 5 months ago #320990 by bizguy
Replied by bizguy on topic Group Field Output using CB Substitutions
I found I was able to output the Field Group data using the following
[cb:userfield field="FIELD_NAME" user="REPLACEMENT" /]
and style the data through CSS.

This question is solved enough.

Thanks,
Ed

Please Log in to join the conversation.

3 years 5 months ago #320997 by krileon
Replied by krileon on topic Group Field Output using CB Substitutions

Is there a way to access the individual items, or format the output?

Yes, you can substitute individual field group fields using the formatting explained format.

FIELD_NAME__INDEX__FIELD_NAME

The first field name is the name of your field group field. For example lets call it cb_fieldgroup. Next the index is the row in the field group field you want to access. The index always begins with 0. Finally the last field name is the name of the field in the field group field of the specified row that you want to substitute in. For example lets call this cb_text. This gives you the below.

cb_fieldgroup__0__cb_text

Used as a raw substitution you'd have the below.

[cb_fieldgroup__0__cb_text]

This should function anywhere substitutions are supported.


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: bizguy

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.215 seconds

Facebook Twitter LinkedIn