Skip to Content Skip to Menu

🌟 CB Editor Assistant 1.0.0 is here! Discover our new AI Joomla Plugin that wrote its story! (and this banner!)
Start at just $12.50/month* or 💸 save 30% with our 🛍️ Black Friday Intro Offer for your subscription's lifetime
🎉 Black Friday sale is here! Great savings on professional and developer memberships! Get 25% off now with code BLACK-FRIDAY-2024!

field substitutions

  • dbeezley
  • dbeezley
  • OFFLINE
  • Posts: 74
  • Thanks: 9
  • Karma: 0
6 years 2 weeks 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 or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48560
  • Thanks: 8292
  • Karma: 1445
6 years 2 weeks 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 or Create an account to join the conversation.

  • dbeezley
  • dbeezley
  • OFFLINE
  • Posts: 74
  • Thanks: 9
  • Karma: 0
6 years 2 weeks 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 or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48560
  • Thanks: 8292
  • Karma: 1445
6 years 2 weeks 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 or Create an account to join the conversation.

  • dbeezley
  • dbeezley
  • OFFLINE
  • Posts: 74
  • Thanks: 9
  • Karma: 0
6 years 2 weeks 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 or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48560
  • Thanks: 8292
  • Karma: 1445
6 years 2 weeks 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 or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum