Skip to Content Skip to Menu

Inconstancy with CB Conditional

  • dotcom22
  • dotcom22
  • OFFLINE
  • Posts: 522
  • Thanks: 14
  • Karma: 4
10 years 7 months ago - 10 years 7 months ago #242966 by dotcom22
Inconstancy with CB Conditional was created by dotcom22
1)

I want apply the same kind of usage as described on point 3 of your tutorial (Show or hide values from available choices for drop-down fields based on other values) located here:

www.joomlapolis.com/support/tutorials/107-use-cases/18336-using-cb-conditionals-to-hide-or-show-fields-or-tabs

My goal is to show/hide fields and related options (when available) for make a kind of step-by-step process. The process I need is not during registration but is only when user edit is profile. I tried many things/scenario but I get always problems.

Let's say for example I have a drop down field called "Drop1" with 2 option:

- Option A
- Option B

Then let's say I have another field called "Drop2" with 3 options:

- Option 1
- Option 2
- Option 3

What I want here is to hide Option 3 IF Option B is selected. So for do that I apply a "Field conditional other" to field Drop1 and I set to hide Option 3 IF value contain "Option B". In practice this work BUT I notice if user first choose Option A and Option 3 and then for any reason decide to modify from Option A to Option B, the Option 3 REMAIN selected when normally it should be hidden. In this situation, user is allowed to save the "Option 3" value when normally is not supposed to be the case.

It seem the show/hide process is not dynamic and this is annoying because we can't have a guaranteed to always propose the right fields for the right situation.

Any comment ?


2)

When we set mutiple conditions for the same field (using available Conditonal Tab from 1 to 5) it seem all these condition must be met for work. Is not possible to use different condition with IF operator meaning IF one specific condition (or even if one or more) is detected for handle the conditional process.

Do you confirm ?


3)

I noticed also if user have already saved his profile and want later modify some information, the conditional logic is broken because value which has been already stored are taken in consideration instead to use value being modified by the user.

So CB Conditional seem planned only for be used especially during registration. When is matter to edit profile, the conditional logic do not work well except maybe for some very very basic case.

any clue ?

I use Joomla 3.3.6 - CB 2.0.4 - CBSubs 4 - Several Incubator plugins
Last edit: 10 years 7 months ago by dotcom22.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48478
  • Thanks: 8282
  • Karma: 1443
10 years 7 months ago #243014 by krileon
Replied by krileon on topic Inconstancy with CB Conditional

It seem the show/hide process is not dynamic and this is annoying because we can't have a guaranteed to always propose the right fields for the right situation.

Any comment ?

Options Show/Hide feature is in its infancy. It currently does not remove its selected or checked state, but it will in next release. Conditional self in next release will also support options conditioning. For now the only solution is to condition the entire field it self and ensure value resetting is enabled so it'll reset the fields values when the condition fails.

When we set mutiple conditions for the same field (using available Conditonal Tab from 1 to 5) it seem all these condition must be met for work. Is not possible to use different condition with IF operator meaning IF one specific condition (or even if one or more) is detected for handle the conditional process.

Do you confirm ?

If conditioning the same field multiple times then only the last conditional fired on that field is relevant. This has always been the case, but it may change in the future if AND/OR usage can be implemented easily (currently it can not and would require a large rewrite).

I noticed also if user have already saved his profile and want later modify some information, the conditional logic is broken because value which has been already stored are taken in consideration instead to use value being modified by the user.

So CB Conditional seem planned only for be used especially during registration. When is matter to edit profile, the conditional logic do not work well except maybe for some very very basic case.

any clue ?

Don't understand the issue. CB Conditionals works perfectly fine with profile edit, profile view, registration, userlist view, and userlist searching. If you don't want existing values to affect conditionals then you need to enable value resetting (disabled by default) within CB Conditional > Config. This will cause values to reset if the conditional fails.


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