field substitutions

5 years 5 months ago #308530 by dbeezley
field substitutions was created by dbeezley
I want to use field substitution in admin email but I want it to show the "Label" rather than the "Value" for the field. How do I do that?

Please Log in to join the conversation.

5 years 5 months ago #308542 by krileon
Replied by krileon on topic field substitutions
There's no substitution usage for returning just the field label. You'd have to manually add the field label to the email then substitute in the value or substitute in both using the formatting parameter set to div or span.


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.

Please Log in to join the conversation.

5 years 5 months ago #308548 by dbeezley
Replied by dbeezley on topic field substitutions
I'm not sure I understand, but it looks like I'll have to do things manually in any case. What I have is a field that stays consistent for an individual over time, but from time to time we need to change the reported name (label) of the field. There may be up to a hundred different choices for the field, administratively selected from a drop box. So if I understand that I need to manually enter then I'll need to compose the emails individually rather than bulk. The field names are actually a shorthand reference that I use internally. Am I getting this right?

Please Log in to join the conversation.

5 years 5 months ago #308554 by krileon
Replied by krileon on topic field substitutions
Unfortunately at this time there's no means of substituting in only the fields label. You can only substitute it in with the value as well and only for a div or span formatted output. Example as follows.

Div
[cb:userfield field="FIELD_NAME" formatting="div" /]

Span
[cb:userfield field="FIELD_NAME" formatting="span" /]

These might not display how you're needing or wanting them to though, but at this time it's the only means for outputting the field label.


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.

Please Log in to join the conversation.

5 years 5 months ago #308555 by dbeezley
Replied by dbeezley on topic field substitutions
I appreciate your patience. I need to be very literal.
1. If I understand "div" and "span" correctly, it is an either/or choice with "span" being in-line and "div" breaking to a new line, Correct?
2. The name of the field is cb_patriarchtree. In this case, would I do [cb:userfield field="cb_patriarchtree" formatting="div" /] ? Or is it [cb:cb_patriarchtree field="FIELD_NAME" formatting="div" /] ? Or something different?

Please Log in to join the conversation.

5 years 5 months ago #308573 by krileon
Replied by krileon on topic field substitutions

1. If I understand "div" and "span" correctly, it is an either/or choice with "span" being in-line and "div" breaking to a new line, Correct?

Correct.

2. The name of the field is cb_patriarchtree. In this case, would I do [cb:userfield field="cb_patriarchtree" formatting="div" /] ?

Yup, that's right. See our substitution tutorial below for further usage information.

www.joomlapolis.com/documentation/279-community-builder/tutorials/18353-using-substitutions-throughout-cb


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.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.162 seconds