Skip to Content Skip to Menu

CB_Conditional question

  • paxx
  • paxx
  • OFFLINE
  • Posts: 80
  • Thanks: 17
  • Karma: 0
10 years 1 week ago #252022 by paxx
CB_Conditional question was created by paxx
Hi
I have a field (drop down singel select) that is mandatory in registration (and could be changed in profile edit), the field has 21 options (cb_states) (lets call them cb_01 - cb_21)
The field cb_01 - cb_21 has some options inside them (citys) that should be selected.
In each of the field (cb_01 - cb_21) I made a condition like this:

1. Field conditional self
2. If field cb_states
3. Is equal
4. To value cb_01
5. Then show

I then did the same for all other 20 fields (of course change the value in step 4).
Now everything works fine in frontend, except for the fact that the value in cb_01 - cb_21 is not mandatory. So now I would like to do the field cb_01 - cb_21 mandatory.
I made a second condition within cb_01 - cb_21 like this:

1. Field condition others
2. If empty
Then
3. Mandatory cb_01
4. As Two-way (I alsoo tried one-way)

Now this works fine for the three first but as soon as field nr 4 (cb_04) is set to published the front end goes white (tried with maximum error report no errors showed up) I then unpublished the field cb_04 and everything is working again.

Now the question: What have I not understood in this? Where did I do wrong?

Joomla 3.3.6
CB 2.0.2
CB Conditional 3.0.13

If the problem can be solved why worry? If the problem cannot be solved, worrying will do you no good.

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

  • Madan
  • Madan
  • OFFLINE
  • Posts: 46
  • Thanks: 5
  • Karma: 2
10 years 6 days ago #252047 by Madan
Replied by Madan on topic CB_Conditional question
Hi Paxx!

Just a question just so that I got the facts right; you don't have a problem with making the first selection required (the dropdown list), but the second ones?

Did you select "required" in the fields list?

Take care!

/Daniel

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

  • paxx
  • paxx
  • OFFLINE
  • Posts: 80
  • Thanks: 17
  • Karma: 0
10 years 6 days ago #252048 by paxx
Replied by paxx on topic CB_Conditional question
Hi Madan
No the first selecton is ok, no problem there.
It´s the second ones I have problem with.

I have 21 fields with everything from 1 value to 15 values to choose from and depending of what you select in the first dropdown the corresponding second field should show up. All this is ok but I can not make the second field mandatory, if I select mandatory in the fields then I will get an error saying that the rest of the fields are mandatory, and if I try to make a condition after three or four fields I get a white page with no error on (turned debugging on maximum).

Conclusion - Everything works the way I want except for that the second field is not mandatory.
(Maybe not a big deal but there must be a way to configure this so it works the way that if a second field or third or whatever, also this field/s should be mandatory.)

/Stephen

If the problem can be solved why worry? If the problem cannot be solved, worrying will do you no good.

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

  • Madan
  • Madan
  • OFFLINE
  • Posts: 46
  • Thanks: 5
  • Karma: 2
10 years 6 days ago #252049 by Madan
Replied by Madan on topic CB_Conditional question
Hi again!

I've just tested making all possible selections required in my registration form. It's heavily dependent on conditions (at least three dependent steps) and a step-by-step registration. It seems to work just fine.

My installation: J3.3.6, CB2.0 (haven't updated) with conditional plugin 3.0.13.

My settings for drop-down selections are: conditional self, display if 'A' is equal till value 'B'. Translate value disable (translations work anyway). Then mode show.

I have enabled all and the direction is two-ways.

Hope you understand my description of the settings and good luck!

/Daniel

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

  • paxx
  • paxx
  • OFFLINE
  • Posts: 80
  • Thanks: 17
  • Karma: 0
10 years 6 days ago #252055 by paxx
Replied by paxx on topic CB_Conditional question
Hi Daniel

Thanks for your time in this.

I do understand your settings :) , that´s exactly how mine settings are now but I still don´t understand how to make the second dropdown field mandatory.

Field "A" is set to mandatory in the field manager. (By the way, field "A" has 21 options to choose from (#01....-#21)).

The first condition, to show the correct field depending of your choice in field "A" is ok.

Now the corresponding field (from your choice in field "A") shows up and you can make your selection within this field but this field is not mandatory so you could have it empty (which I do not want).

If I in field manager set all the 21 fields to be mandatory (#01-#21), after that I made a selection in the second field I got this error saying that all other fields are mandatory (which I suppose is correct) so I need to have a second condition that says that if I had made a selection in field #01 then all other fields #02-#21 is not mandatory.

So I make another condition like this:

Field conditional others => Is operator Not empty => Then Field Non-Required (selecting the fields that should not be required) => Two Ways.

But this ends up in a white page in frontend (at least for me) with thees warnings:

Warning: explode() expects parameter 2 to be string, array given in /../../../../../public_html/components/com_comprofiler/plugin/user/plug_cbprivacy/cbprivacy.class.php on line 584
Warning: in_array() expects parameter 2 to be array, null given in /../../../../../public_html/components/com_comprofiler/plugin/user/plug_cbprivacy/cbprivacy.class.php on line 594
Warning: in_array() expects parameter 2 to be array, null given in /../../../../../public_html/components/com_comprofiler/plugin/user/plug_cbprivacy/cbprivacy.class.php on line 594
Warning: in_array() expects parameter 2 to be array, null given in /../../../../../public_html/components/com_comprofiler/plugin/user/plug_cbprivacy/cbprivacy.class.php on line 594
Warning: in_array() expects parameter 2 to be array, null given in /../../../../../public_html/components/com_comprofiler/plugin/user/plug_cbprivacy/cbprivacy.class.php on line 594
Warning: in_array() expects parameter 2 to be array, null given in /../../../../..//public_html/components/com_comprofiler/plugin/user/plug_cbprivacy/cbprivacy.class.php on line 594
Warning: in_array() expects parameter 2 to be array, null given in /../../../../../public_html/components/com_comprofiler/plugin/user/plug_cbprivacy/cbprivacy.class.php on line 594


So obviously I´m doing something wrong here but I don´t know what.
So all help to understand this is much appreciated.

Thank you for your time

/ Stephen

If the problem can be solved why worry? If the problem cannot be solved, worrying will do you no good.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48482
  • Thanks: 8283
  • Karma: 1443
10 years 5 days ago #252115 by krileon
Replied by krileon on topic CB_Conditional question
CB Privacy and CB Conditional likely will not work on CB 2.0. They won't white page your site, but they may not work. They have not received their upgrades yet. CB Privacy upgrade will start this week. Once CB Privacy upgrade is done I will be upgrading CB Conditional.

Please also note showing and hiding select options does not work on IE or Safari as "display: none;" on options does not work on those browsers. A workaround will be to also disable the options (they won't be hidden though) for those browsers in next release.


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