[SOLVED] Display field

3 days 22 hours ago - 2 days 23 hours ago #318718 by XBOOMX
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?
3 days 1 hour ago - 3 days 1 hour ago #318730 by krileon
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 - Templates - CBSubs - Hosting - Forge - Incubator - GroupJive
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 EST to 4:00 PM EST. 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
2 days 23 hours ago #318740 by XBOOMX
Thanks a lot. Is done.
The following user(s) said Thank You: krileon
Moderators: beatnantkrileon
Time to create page: 0.434 seconds

Facebook Twitter LinkedIn