Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

CB Conditional - condition operators in Registration & Profile View

11 years 8 months ago - 11 years 8 months ago #221473 by philiplardner
The CB ConditionalUser plugin places allows for up to five conditions to be set for displaying and activating profile tabs and fields. What logical operators are used when more than one condition is set - are the conditions set in each tab AND or OR in relation to the previous condition tab?

I have a number of fields that only appear in the registration process if the proceeding field is not empty. For instance:

Vehicle #1 Make & Model: (user enters: Ford Escort)
Vehicle #2 Make & Model: (user leaves blank)

I have cb_conditionals set so that the Vehicle #2 field remains hidden until the user enters something in the Vehicle #1 field, at which point the Vehicle #2 field appears on the registration form.

However when the user's profile is viewed, both Vehicle #1 (with user's input data) and Vehicle #2 both appear even if Vehicle #2 is left empty.

Is it possible to use CB_Conditional to hide empty fields in the profile view for this situation? I would prefer to keep the general CB-Configuration-UserProfile-Show Empty Fields:Yes set as is.

Thanks,

Phil.
Last edit: 11 years 8 months ago by philiplardner.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48459
  • Thanks: 8280
  • Karma: 1443
11 years 8 months ago #221503 by krileon

What logical operators are used when more than one condition is set - are the conditions set in each tab AND or OR in relation to the previous condition tab?

That's difficult to answer. They're 5 independent conditionals. You should not have 5 conditionals controlling the same thing as that implies bad setup. If I had to give it an operator I'd say it's "OR", but that's not entirely accurate as again they're independent and unaware of one another.

Is it possible to use CB_Conditional to hide empty fields in the profile view for this situation?

You could set CB to hide empty fields within CB > Configuration > User Profile. Your conditional however shouldn't fail on profile view unless you've profile view disabled for your conditional.


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

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum