I'm using CFv5. Is it possible to do "If Then style validation"? The problem I have to solve is according to the next situation:
I have two components, one dropdown and one text box. When the user choices YES in the dropdown then the text box has to be required. If the user choices NO then the field has to be blank and read only.
How can I do this?
Thanks in advance
Yes, so you can simply use the "events" section under the "Dropdown" settings, and in the "function" box write "enable_validation" when the value is "yes", and "disable_validation" when the value is "no".
Now, assuming your text box field id is "text1", please add a "Load JS" action to your form, and add this code:
If your main question got answered then please mark the answer using the button!
2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for goods and services provided by ChronoEngine.com