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 on required field

8 years 9 months ago #276064 by ks.stadler
CB Conditional on required field was created by ks.stadler
I have a very big problem. Some fields should be hide if the user change a "gender" field. If he chose "male" then for example the "weight" field should be hidden. But for "females" the "weight" field is REQUIRED! If I chose "male" and want to save... I get an error because the required "weight" field is empty.

How could I solve this?

CB Conditionals 4.0.5

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48464
  • Thanks: 8280
  • Karma: 1443
8 years 9 months ago #276067 by krileon
Replied by krileon on topic CB Conditional on required field
You can not condition the same field multiple times. No matter its source. It will cause the conditions to conflict and you'll get issues like what you're experiencing. Ensure the fields are being conditioned only once (conditional self, conditional other, and tab conditions all count).


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.

8 years 9 months ago #276076 by ks.stadler
Replied by ks.stadler on topic CB Conditional on required field
Thanks for your answer... but maybe you did not understand me. The "weight" field has only one condition.
conditional self -> if "gender" field is equal to "male" then "hide". This works fine. But I have set this field to required in the global parameters. Because if the user is a female, she have to fill in some values in this field.

But if the user is a male and would save his profile, he gets an error because the hidden field is empty? I hope you understand me.... my english is not perfect!

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48464
  • Thanks: 8280
  • Karma: 1443
8 years 9 months ago #276104 by krileon
Replied by krileon on topic CB Conditional on required field
Are you absolutely sure it is not being conditioned by any other condition (e.g. a condition on its tab counts). Please disable non-core CB plugins except CB Conditional 1 by 1 to see if issue goes away as it could be a conflict from another plugin.


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.

8 years 9 months ago #276140 by ks.stadler
Replied by ks.stadler on topic CB Conditional on required field
thanks for your help... I will check this!

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

Moderators: beatnantkrileon
Powered by Kunena Forum