Dropdown - Select One - Required

Gatsman 22 Mar, 2018
Hello, i created a dropdown with the following options
Select One
y=Yes
n=No

This dropdown is a mandatory field but as default the first option "Select One" is selected and the validation passes which is wrong in my case.
How can i define the first option as disabled selected?
Gatsman 23 Mar, 2018
Found it, it must be done like this:
=Select One
y=Yes
n=No
pat01 29 Jan, 2019
Hi

Unfortunately this is not working.

I have

=Please select
yes=Yes
no=No

But in Frontend the first entry "Please select" is not shown, just an empty line there in the dropdown. Source code looks like this:
<div class="item active selected" data-value=""></div>


I use CF 6.0.21, do I need to add another code?

Thanks.

Patrick
healyhatman 29 Jan, 2019
1 Likes
No that should be it. Make sure you don't have any empty lines in there
Gatsman 29 Jan, 2019
1 Likes
Even with spaces ( = Please select) it works.
Make sure you don't have anything in the Selected values.
And if you want upload your form for a deeper look.
pat01 29 Jan, 2019
1 Likes
Hi

Thanks a lot to both of you.

I had an empty line at the end of the options. Removing this empty line did solve the problem.
This topic is locked and no more replies can be posted.

VPS & Email Hosting 20% discount
hostinger