[SOLVED] Multi conditions radio + text fields

12 years 3 months ago - 12 years 3 months ago #190418 by dotcom22
Hello

I would like setup several multi conditions radio fields ANd Textfields but it seem is not possible to setup in the way I want. Is better to explain my exact case:

One of my radio field ask this question:

Have you received a Secret ID Key ??

Then the possible options users can shoose is YES or NO. If the user choose YES, a specific DB Lookup field is displayed and nothing more. If the user choose NO, another radio field (called Radio3 in this example for better understanding) is displayed with 3 others options to choose. The fact to choose any of this 3 options display several specific textfields (of course based on the options choose) and no problem about that here..

However... if for any reason at this specific point/step, the user decide to change the value of the previous radio field (the one who ask if user have a Secret ID) from NO to YES, all textfield revelated previously are not hidden but still displayed... That mean the user will see the DB Lookup Field AND all other radio field + related textfields who normally must be displayed only if the value is set to NO.

So I tried to play with conditions on the "Secret ID Key" radio field but without success. That mean I try to setup this:

- If user choose YES => show DB Lookup field and Hide field "Radio3"

I tried also to do this:

- If user choose YES => show DB Lookup field and Hide field "Radio3" + all others textfields related to all options

..but in both case this don't work because radio field and/or textfields are displayed because the conditions is broken...

I don't see how to deal with this.. What I make wrong ??

Hope you understand my process...

thank

I use Joomla 3.3.6 - CB 2.0.4 - CBSubs 4 - Several Incubator plugins

Please Log in to join the conversation.

12 years 3 months ago #190466 by krileon
Replied by krileon on topic Re: Multi conditions radio + text fields

However... if for any reason at this specific point/step, the user decide to change the value of the previous radio field (the one who ask if user have a Secret ID) from NO to YES, all textfield revelated previously are not hidden but still displayed... That mean the user will see the DB Lookup Field AND all other radio field + related textfields who normally must be displayed only if the value is set to NO.

You'll have to chain the conditions together properly. Believe you don't need multiple conditions for this scenario either. The conditions just need to be placed on the right fields. Please keep in mind multiple conditions (1-5) are "or" scenarios so either/or of the conditions matches it'll do as configured.

Field Setup
Field 1: Radio 1 (cb_radio1) - Yes|No
Field 2: DB Lookup (cb_dblookup)
Field 3: Radio 2 (cb_radio2) - 1|2|3
Field 4: Text 1 (cb_text1)
Field 5: Text 2 (cb_text2)
Field 6: Text 3 (cb_text3)

Radio 1 (cb_radio1) Condition
Display: Field conditional others
Operator: Equal To
Value: No
Hide: Radio 2 (cb_radio2), Text 1 (cb_text1), Text 2 (cb_text2), Text 3 (cb_text3)

DB Lookup (cb_dblookup) Condition
Display: Field conditional self
Field: Radio 1 (cb_radio1)
Operator: Equal To
Value: No
Mode: Show

Radio 2 (cb_radio2) Condition
Display: Field conditional self
Field: Radio 1 (cb_radio1)
Operator: Equal To
Value: Yes
Mode: Show

Text 1 (cb_text1) Condition
Display: Field conditional self
Field: Radio 2 (cb_radio2)
Operator: Equal To
Value: 1
Mode: Show

Text 2 (cb_text2) Condition
Display: Field conditional self
Field: Radio 2 (cb_radio2)
Operator: Equal To
Value: 2
Mode: Show

Text 3 (cb_text3) Condition
Display: Field conditional self
Field: Radio 2 (cb_radio2)
Operator: Equal To
Value: 3
Mode: Show

I believe the above should do as you're wanting.


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 3 months ago #190532 by dotcom22
Replied by dotcom22 on topic Re: Multi conditions radio + text fields
excellent I got the concept...

The data you provide me are not exactly correct for my need but I found how to adapt it..

thank

I use Joomla 3.3.6 - CB 2.0.4 - CBSubs 4 - Several Incubator plugins

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.200 seconds

Facebook Twitter LinkedIn