CB Conditional

12 years 9 months ago - 12 years 9 months ago #170700 by amir00251
CB Conditional was created by amir00251
Hello,

I have a dropdown field for states. My intention is to define a conditional dropdown field for town/city which would apear on condition of states, say if the state in state dropdown is California, it would show the dorpdown field which contains cities in California.

First of all, I use a Field Conditioanl Self, and if I define as below:

If state is Equal to California then Show (dropdown field of cities in California)

The above does not work unless I change the (Equal to) to (Does Contain)? I have tried all forms but it does not show the city field when it is defined with "Equal to"

The seond problem is that, say I defined the Conditional field with "does Contain". Then I have the field appears as it should be, however, say user changes the state in state dropdown. The condition now has been changed but in registration page, the City dropdown does not change according to the change in the state.

I would appreciate if you could comment and let me know if there is any suggestion.

Also I have not been able to find tutorials for CB Incubator Projects, Should I look for inside each project itself?

Thanks.

Please Log in to join the conversation.

12 years 9 months ago #170761 by krileon
Replied by krileon on topic Re: CB Conditional

The above does not work unless I change the (Equal to) to (Does Contain)? I have tried all forms but it does not show the city field when it is defined with "Equal to"

Equal to is an exact 1 to 1 match. Meaning if the value is "california" and you're matching "California" then it will fail. Does contains matches exactly, but also doesn't care if it's in the middle of a sentence or whatever the case. the contains operators are best used on multi-select type fields.

The seond problem is that, say I defined the Conditional field with "does Contain". Then I have the field appears as it should be, however, say user changes the state in state dropdown. The condition now has been changed but in registration page, the City dropdown does not change according to the change in the state.

Don't understand, so the condition is not working at all on registration? I could not confirm this, appears to be working fine. Please ensure you've the latest release.

Also I have not been able to find tutorials for CB Incubator Projects, Should I look for inside each project itself?

Incubator projects are not supported officially. Meaning we've no tutorials, no official bug and security testing, etc.. They're there for advanced users to review possible new features for CB as well as obtain latest projects to expand their CB sites functionality. They're considered "as-is" and "learn as you go".

CB Conditionals in particular is quite self explanatory. Simply review the descriptions next to an input field or notice that each selection is in a fieldset telling you how the configuration should progress.


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 to join the conversation.

12 years 9 months ago #170831 by amir00251
Replied by amir00251 on topic Re: CB Conditional
Hi Krileon,

On the issue of Equal TO or Does Contain, I have two dropdown fields (so position in sentence does not matter) and I have also use corrent upper or lower case letters but I still fail to use Equal To. However let's consider that I would use Does Contain.


On the second issue:

Let's consider that I have a dropdown list which does include California and Arizona.

Then I define second dropdown that if the first dropdown was California show a dropdown contains Los Angeles, San Franciso, etc.

Then I define third dropdown that if the first dropdown was Arizoan show a dropdown contains Phoenix, Tucson.

Now, say someone comes to registration page, default is California in the first dropdown and I can see the City dropdown si the second dropdown containing Los Angeles and San Francisco, etc. So the Conditional field is working fine.

Now consider user changes the first first dropdown to Arizona, the City dropdown does not change to the third dropdown to contain Phoenix, ....

In other words it does not change dynamic. Is there any way around this? or any other solution I could defind dynamic conditional?

Many thanks.

Please Log in to join the conversation.

12 years 9 months ago - 12 years 9 months ago #170866 by krileon
Replied by krileon on topic Re: CB Conditional

In other words it does not change dynamic. Is there any way around this? or any other solution I could defind dynamic conditional?

No, you need to place your conditions elsewhere. Instead of placing the condition on your State drop-down (California, Arizona, etc..) you need to place it on your cities drop-down (Phoenix, etc..). Please review the conditional options as you can conditionally display fields based off self or based of other. CB Conditional doesn't change drop-down values of a field, it only show/hides fields. Example setup as follows.

State - cb_state
City - cb_city_arizona
City - cb_city_california

You'd have a city field for each state in your state drop-down. You'd place the conditional on the city field and NOT on the state field. If you place it on the state field then it's conditional only for 1 value.


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

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.487 seconds