Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

cb conditional not working

9 years 10 months ago #255842 by ninokorinteli
cb conditional not working was created by ninokorinteli
Hello,
cb conditional is not working on the front end - just simply doesnot hide/show fields although i have condition set in the backend , this problem started from 4.0.3 and i just installed 4.0.4 and it gives me the same. plus when im going to the field edit it gives me unsresponsive script msg, what im doing wrong? (screenshots attached)
pls help
Attachments:

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

  • heyai
  • heyai
  • OFFLINE
  • Posts: 324
  • Thanks: 79
  • Karma: 24
9 years 10 months ago #255850 by heyai
Replied by heyai on topic cb conditional not working
I've got no experience with an issue like this, but with regex checks somewhere else... have you tried altering the condition to something very simple / not regex to see whether conditional is the problem or something else?

hey-ai - the community for asian guys and non-asian girls

The search bar is your friend, not just decoration!

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
9 years 10 months ago #255872 by krileon
Replied by krileon on topic cb conditional not working
Joomla version? CB version? Have you tried on frontend with default Joomla template? Do you have CSS/JS compression extensions? If so, please disable them and retry. Ensure your fields are not being conditioned multiple times. Only the last condition applied is relevant; keep conditions simple and do not try to multi-condition everywhere or it's going to get massively confusing. On frontend when testing if your condition works press F12, reload the page, then see if there are any fatal (red) errors in the console. If there are you've a JS error that's breaking CB Conditional jQuery.


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.

9 years 9 months ago #257752 by ninokorinteli
Replied by ninokorinteli on topic cb conditional not working
Thank you, i have Joomla 3.3.6, CB was 2.0.4 (now upgraded to 2.0.5),

it seems i found the issue - there is a single select drop down field - cb_profile which is selected by user during the registration and after this different tabs and fields appear dependable on the selected value. This field (cb_profile) is not meant to be changed after registration, so it does not appear on edit view and on profile view (on profile view it's selected value is rendered through custom html field in another tab)

So in field settings 'Show on Profile' was set to 'no' (and still is);
'Show on Profile Edit' was turned to 'no' too, and as soon as i changed it to 'Yes, one line with title' conditional start working again, and there were no more error messages. instead of this i set conditional to hide if field (cb_profile) is not empty and enabled it only on edit view. Honestly i dont understand any logic why that helped, i was changing settings in this particular field since other fields were conditioned against it and it was a possibility that the problem was in it.


Now i'm having another problem with conditional in the user lists search, same joomla version- 3.3.6, CB 2.0.5, conditional 4.0.5

i conditioned field cb_stage to show if cb_projecttype is equal to 'stage' (cb_projecttye is single select dropdown), and enabled condition on User Search.
In user lists i have only one column - profile name linked to profile, and in search parameters - Searchable fields: Specific Searchable Fields;
Fields to search: selected both cb_stage and cb_projecttype;
Search criteria: Simple exact match: only 'is' and ranges;
Hide Empty Searches: No;
Collapse Search Criteria: No

when i go to live view and try to search users cb_projecttype has 'no preference' value in dropdown on default and cb_stage is showing, as if not conditioned at all, only after i start selecting other values one by one from cb_projecttype it eventually starts to hide and show, but not always, sometimes it doesnot hide even if other value is selected. What i am doing wrong? what causes this?

Thanks again for your help
Nino

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
9 years 9 months ago #257779 by krileon
Replied by krileon on topic cb conditional not working

it seems i found the issue - there is a single select drop down field - cb_profile which is selected by user during the registration and after this different tabs and fields appear dependable on the selected value. This field (cb_profile) is not meant to be changed after registration, so it does not appear on edit view and on profile view (on profile view it's selected value is rendered through custom html field in another tab)

So in field settings 'Show on Profile' was set to 'no' (and still is);
'Show on Profile Edit' was turned to 'no' too, and as soon as i changed it to 'Yes, one line with title' conditional start working again, and there were no more error messages. instead of this i set conditional to hide if field (cb_profile) is not empty and enabled it only on edit view. Honestly i dont understand any logic why that helped, i was changing settings in this particular field since other fields were conditioned against it and it was a possibility that the problem was in it.

Yup, that'll do it. It can't load the conditions of a field that isn't loaded as CB Conditional has no idea it exists. To circumvent this you need to use Conditional Self on your fields/tabs instead of letting the field it self show/hide other fields.

when i go to live view and try to search users cb_projecttype has 'no preference' value in dropdown on default and cb_stage is showing, as if not conditioned at all, only after i start selecting other values one by one from cb_projecttype it eventually starts to hide and show, but not always, sometimes it doesnot hide even if other value is selected. What i am doing wrong? what causes this?

Depends on your condition. No Preference is an empty string value and is always present for selects on userlist search as it's a way of telling it to ignore the input for searching. Based off your condition this should be working fine, but looks like initial display isn't triggering the condition check. Have created a bug ticket to investigate search conditions to see if a bug could be present.

forge.joomlapolis.com/issues/5046


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.

  • phredcg
  • phredcg
  • OFFLINE
  • Posts: 8
  • Thanks: 0
  • Karma: 0
9 years 4 days ago #272721 by phredcg
Replied by phredcg on topic cb conditional not working
I am not sure if this goes here, and it seems like this post was up some time ago, but I am also having this issue.

I have set the profiles up for our alumni so that when the check a box on the year they attended our training, the classes for that will appear from which they can also select the class they attend. This works fine when editing the profile, but from the search option all the classes for all the years appear. I am attaching a couple of screen shots to show this.

I then saw this forum, and I was able to duplicate the effect of when I click on checkbox for a year and then uncheck that box the classes are hidden. So, it appears the problem is at the opening of the search, but resolves itself when selecting a year. However, that would have to be done for each year. It would also mean a rather long list during the search.

Did I miss that this was resolved or there is a solution to this or is this still an issue. Thanks!

Joomla 3.4.5
Community Builder 2.0.11
Conditional Plugin 4.0.5.CI.2015.0…



Attachments:

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

Moderators: beatnantkrileon
Powered by Kunena Forum