Checkbox / Radio box question

1 week 2 days ago #316663 by AlanJones
Hello, I have a question that will hopefully be easy to answer.

On the site, we have church membership. We have an admin that comes in and moderates a field we have set up, currently, it is a radio box, with yes or no.

The issue is, we want the label to display "Church Member" if they are one, and simply nothing at all if they are not. We have some users that are not apart of the church but use the site, and we do not want to embarrass them by putting "Not a member" or something like that.

I tried using a checkbox field to see if it would be set to "Yes" When checked and display nothing when unchecked but it displayed "No"

Let me know what I should do. Thanks!
1 week 2 days ago #316665 by krileon
Easiest way is to just use the Layout features of a field. To use this edit your field in CB > Field Management and under Layouts use the following in Profile Value Layout for example.

[cb:if FIELD_NAME="1"][value][/cb:if]

Replace FIELD_NAME with the name of your field and replace the 1 with whatever the value is for "Church Member". This should cause it to display its value only if church member is selected otherwise it'll display the empty field value. Next you'd want to configure CB within CB > Configuration > User Profile to hide empty field values so the field doesn't show at all. You don't have to use [value] either, which will just output the value of your field; it can output whatever you like there.

Another option is to suppress a field based off value using CB Conditional. The below for example will hide the field entirely in profile view and userlist view, but not edit views, if it's a certain value.

Display: Field conditional show
Field: (select the fields self here)
Operator: Equal To
Value: 1
Registration: No
Profile Edit: No
Profile View: Yes
Userlists Search: No
Userlists View: Yes

Change the value to whatever the value is for your "Church Member" option is. This would cause the field to completely hide if they're not a church member for example.

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.
Moderators: beatnantkrileon
Time to create page: 0.418 seconds

Facebook Twitter LinkedIn