[SOLVED] Hidden Fields that in some cases are required.

2 weeks 1 day ago - 1 week 6 days ago #337845 by AlexRag
I have a use case question.  

I have a field item that depending on Yes/No will display a second yes/no field item.   

eg.   
1. Would you like to join a committee?   Y/N 
2. Would you also like to lead the committee?  Y/N. (Hidden if #1 is No)

I used CB Conditionals to hide the second question if the first answer was No. However, if the answer is Yes Question # 2 must also be answered (required).   

If I set the second to required and thus never revealed since the first answer was No, will the registration form submit work?   

If not would I be better off prepopulating the answer to Question 2 to No so it contains an answer?

Thanks!

 

Please Log in to join the conversation.

2 weeks 23 hours ago #337855 by krileon
CB Conditional can't make something required. So you'd either have to make your second field required for everyone or make a 3rd field that is required and take into account whatever the other condition is that would constitute it sometimes being required.

As for hiding a required field CB Conditional will suppress all of its validation so that's not a problem.


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 to join the conversation.

2 weeks 18 hours ago #337866 by AlexRag

As for hiding a required field CB Conditional will suppress all of its validation so that's not a problem.


I think this is what I was looking for.    To confirm,  If question #2 is hidden (By CB Conditionals), it ignore the "required" setting in the field.     
 

Please Log in to join the conversation.

2 weeks 6 minutes ago #337875 by krileon

To confirm, If question #2 is hidden (By CB Conditionals), it ignore the "required" setting in the field.

Correct. All validation will be ignored for the field if hidden by CB Conditionals.


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.
The following user(s) said Thank You: AlexRag

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.204 seconds

Facebook Twitter LinkedIn