Dropdown field - fail validaion on choice of one options

Make a dropdown option fail form validation.

Overview

The issue occurs when a specific dropdown choice, like 'No', needs to prevent form submission.
Set the invalid option to have no value in the dropdown settings and mark the field as required, so selecting it triggers a validation failure.

Answered
ChronoForms v6
di divixpl 03 May, 2019
Hiya! Really simple thing that got me very confused. I have a dropdown field with options y=yes and n=no. Now, if a user chooses no I need the field to fail validation making the form unable to submit. I believe I need to specify that condition in the 'Validation rules' box but I am clueless as to what to put in there. Is there something I am missing? Thank you!
Gr GreyHead 04 May, 2019
Answer
1 Likes
Hi divixpl,

Why would you have a No option that is not valid? It does nothing but confuse the user.

The 'usual' way to do this is with a check box that is required.

Bob
he healyhatman 04 May, 2019
EASY. Just do
y=Yes
=No
And set it to required. This way No has no value, and validation will fail.
di divixpl 07 May, 2019
Thank you very much for help! That's exactly what I needed. I do realise it may seem confusing, I needed a drop down list where only one option would be invalid, above helped me just fine.
This topic is locked and no more replies can be posted.