Skip to Content Skip to Menu

🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

CB Conditional, Applying multiple rules doesn't seem to work (tabs 1 - 5)

  • startup
  • startup
  • OFFLINE
  • Posts: 113
  • Thanks: 7
  • Karma: 1
  • Add-ons
9 years 9 months ago - 9 years 9 months ago #261083 by startup
Hi there,

I'm trying to apply multiple rules to hide a certain drop-down using CB Conditionals.

I have 2 drop-downs.

Drop-down 1 contains the following values:
[ ] (<- this is just an empty entry within the dropdown to keep it empty in case people don't want to select anything)
111
222
333
444
123456789

Drop-down 2 contains the following values:
[ ] (<- this is just an empty entry within the dropdown to keep it empty in case people don't want to select anything)
AAA
BBB

Now I would like drop-down 2 to NOT be displayed when within drop-down 1 [ ] or 123456789 are selected.


I tried two approaches:

1) Within field drop-down 1

I'm using the first 2 of the 5 tabs (tabs 1 to 5) within the "CB Conditional" tab to accomplish this, using "Field conditional others":

Tab 1:
If... Operator "Empty"
Then... Fields Hide "drop-down 2"

Tab 2:
If... Operator "Equal to"
To... Value "123456789"
Then... Fields Hide "drop-down 2"


2) Within field drop-down 2

I'm using the first 2 of the 5 tabs (tabs 1 to 5) within the "CB Conditional" tab to accomplish this, using "Field conditional self":

Tab 1:
If... Field "drop-down 1"
Is... Operator "Empty"
Then... Mode "Hide"

Tab 2:
If... Field "drop-down 1"
Is... Operator "Equal to"
To... Value "123456789"
Then... Mode "Hide"


The result in both cases is, that only one of the two rules works, meaning either drop-down 2 is not displayed when [ ] is selected OR when 123456789 is selected. But it never works for both cases.


What am I doing wrong?

I would be very thankful for some help on this one. Thank you very much!
Last edit: 9 years 9 months ago by startup.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48622
  • Thanks: 8303
  • Karma: 1446
9 years 9 months ago #261157 by krileon
Applying multiple conditions to the same tab or field isn't support to work. It's to allow a field to condition multiple fields or tabs however needed. If you condition a tab or field multiple times only the last condition applied will matter. This is because the conditions work independently. They are not aware of each other. Eventually there will be AND/OR type usage so you can have multiple conditions work together.

In most cases you'll want to use conditional self instead of conditional other to better avoid conflicts.


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 or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum