Required field only if visible

ltempest 28 Feb, 2020
Hello,
I have two dropdown options that are initially hidden on my form. A radio group of two buttons before this allows the user to select an option. From this option one of the two dropdowns is made visible to allow them to select a group to send the form to. I need to make this visible dropdown a required field. However I have treid to make them required, but the form never submits as it is erroring on the dropdown that is still hidden.

Please view: https://www.hunterpanels.com/index.php?option=com_chronoforms5&chronoform=WallQuoteForm_DEC18

You can see the radio buttons are the first option, selecting one reveals a dropdown, it is this dropdown that I want to make required, but only when made visible.

Is this possible in version 5?

Thanks
GreyHead 28 Feb, 2020
Hi ltempest,

I think that you need set them both to be required, then disable them when they are hidden and enable them when they are shown. That should get round the problem as the 'required' will be ignored on a disabled element.

Bob
healyhatman 29 Feb, 2020
One of the events is "disable validation"
This topic is locked and no more replies can be posted.