how to return label of selected drop down?

4 years 8 months ago #313310 by saman2
hi
i want use cb subsition to return label of dropdown that user select that. how to do that? when i use [cb_city] it is return value not label.

Please Log in to join the conversation.

4 years 8 months ago #313311 by krileon
Replied by krileon on topic how to return label of selected drop down?
[FIELD_NAME] is always raw stored values. If you want formatted values you need to use [cb:userfield field="FIELD_NAME" /]. See the substitution documentation 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.

4 years 8 months ago #313312 by saman2
Replied by saman2 on topic how to return label of selected drop down?
i find that ...i ask this in the past but forget(if you can please combine this topic with that):
www.joomlapolis.com/forum/153-professional-member-support/241128-how-to-get-cb-lable-in-drop-down-field
but it is not work for me. i have a single drop down that have some value/label such as 1/A 2/B 3/C ...
i want get A B C ... i use [cb:userfield field="cb_city" /] but it is return empty and when i use [cb_city] it is return 1 2 3 ....
my Cb is latest version. can you test it with single drop down field?

Please Log in to join the conversation.

4 years 8 months ago #313316 by krileon
Replied by krileon on topic how to return label of selected drop down?
If [cb:userfield field="FIELD_NAME" /] returns an empty result then the field isn't set to display on profile, its tab isn't accessible, the field is conditioned away via CB Conditional, or it's not accessible due to privacy via CB Privacy. [FIELD_NAME] does not care about access or privacy as it's for raw output.


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.

4 years 8 months ago #313332 by saman2
Replied by saman2 on topic how to return label of selected drop down?

krileon wrote: field isn't set to display on profile, its tab isn't accessible, the field is conditioned away via CB Conditional, or it's not accessible due to privacy via CB Privacy.

i check all these but all of that is ok, is there any other any setting ?
also i have this problem in auto action request type. i want send this as a request. is there anyway?

Please Log in to join the conversation.

4 years 8 months ago #313342 by krileon
Replied by krileon on topic how to return label of selected drop down?
If the field is not accessible to the viewing user then [cb:userfield field="FIELD_NAME" /] will display nothing. There's nothing more to it beyond that. The easiest way to test for this is view the users profile and if you can't see the field then [cb:userfield field="FIELD_NAME" /] won't output it either. The only exception is if it's on a tab in a not shown on profile position. Review your configuration carefully as it has been configured in some way to not display.

also i have this problem in auto action request type. i want send this as a request. is there anyway?

Send what as a request? The Request type just does an HTTP call.


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.220 seconds

Facebook Twitter LinkedIn