Skip to Content Skip to Menu

🕒 Save Time and Effort with CB Editor Assistant: Effortlessly create and refine content in Joomla 3, 4, & 5.
🎁 Limited Offer: Enjoy a 5-day FREE trial and save up to 30% afterward!

[SOLVED] field doesn't hide (CB conditional)

7 years 4 months ago - 7 years 4 months ago #296633 by stef-atefka
Hello,

My problem :
I'd like to use cb conditional function to hide some fields from choices made in a dropdown.
For each case (4 including empty), i used conditionnal others to show or hide fields (Which have exact identical params).
For two of the fields, it works perfectly, but for the two orther not.
I made many tries, like changing the logic to put in each of the 4 fields "self conditional" params, but nothing works differently,it's always the same.
I trought to delete the two fields and rebuild all but it's not better, the new ones does'nt hide.

Must i do something special, would you advise me to look for some params ?

Thank you,
Best regards,
Stef
Last edit: 7 years 4 months ago by krileon. Reason: Added [SOLVED] tag to subject

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48707
  • Thanks: 8319
  • Karma: 1447
7 years 4 months ago #296639 by krileon
Replied by krileon on topic field doesn't hide (CB conditional)
You can not condition a field multiple times. Ensure you are conditioning each field only once. Conditioning multiple times will just cause the two conditions to reverse each other. If still not working please provide what you've set the condition parameters to as there just could be an issue with what you're trying to match. You can also enable debug mode within CB Conditional > Parameters which logs the jQuery conditions to browser console (F12 > Console) and PHP conditions are var dumped (enable debug mode and maximum error reporting in Joomla global configuration to see during save operations).


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.

7 years 4 months ago #296735 by stef-atefka
Replied by stef-atefka on topic [SOLVED] field doesn't hide (CB conditional)
Thank you for the answer !

You can not condition a field multiple times


That's it...

The problem i caused :

For each case of field 0 (4 including empty), i used conditionnal others to show or hide fields

case1 (empty) : Hide fields 1,2,3,4
Case 2 : Hide fields 1,2,3,4
Case 3 : Show fields 1 and 2, hide fields 3 and 4
Case 4 : Show fields 3 and 4, hide fields 2 and 1

The way to solve it :
Field 0 : No condition
For each of fields 1 to 4 : conditionnal self (One case of field 0=>show, not that case =>hide)

This way, i stopped creating conflicts... Simple but it's hard to change logic alone...

Thank you !
The following user(s) said Thank You: krileon

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

Moderators: beatnantkrileon
Powered by Kunena Forum