[SOLVED] Display field

2 months 1 week ago - 2 months 1 week ago #318718 by XBOOMX
[SOLVED] Display field was created by XBOOMX
Hi,
I have a dropdown field where you can choose either red, green or blue. If no color has been selected, the field only shows a dash (-). I would like that if the user has not yet chosen a color, the field shows by default: "Nothing selected".
Can I do that with substitutions? If so, what do I have to write?
Thanks.

Please Log in to join the conversation.

2 months 1 week ago - 2 months 1 week ago #318730 by krileon
Replied by krileon on topic Display field
One way to do this is to just add a "None" option and mark the field required. Another is to use the Layout parameter to customize how it displays on profile. Specifically under Parameters > Layouts you can add an IF substitution to "Profile Value Layout" to condition how no value displays. Example as follows.

[cb:if FIELD_NAME=""]Nothing Selected[cb:else][value][/cb:else][/cb:if]

Replace FIELD_NAME with the actual name of your field. If you want to change the empty field indicator for all fields you can adjust the "Empty Field Text" parameter in CB > Configuration > User Profile.


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

Please Log in to join the conversation.

2 months 1 week ago #318740 by XBOOMX
Replied by XBOOMX on topic Display field
Thanks a lot. Is done.
The following user(s) said Thank You: krileon

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.432 seconds

Facebook Twitter LinkedIn