I'm trying to create a field that requires the user to select from a dropdown field (Select field). I inputted the selection options and the first option shows by default. Instead of that, however, I'm trying to get it to show some default "Select option" or something of that sort and then requires the user to select from the dropdown selection options. I know I can just input "Select Option" as the first option, but I need to make this a required field that ensures the user makes a real selection—that is to say, an option that isn't just the "Select Option" option if I were to put that in as the first option. Any idea on how to do this?
1 Answer
If you specify your first option as:
<option value="">Select Option</option>
i think that should be treated as empty and will not be accepted if the field is required in your form.
-
Is there a way to do this with the form composer, or do I have to manually add this field along with all the other fields I'm using? The composer is saving me a lot of work to create all my form fields, so having to code in all the fields just to do this would be such a bummer!– user3092Aug 14, 2014 at 17:34
-
Sorry, I've never used the pro version so I'm not familiar with how the composer works.– JanineAug 14, 2014 at 22:25
-
If you're using Composer and your field is a Select field, in the Freeform CP, under "Fields", select your Select field, choose the Value/Label List field option and add a row where the value is empty and the label is your text, eg. "-- Select one --".– SolspaceAug 16, 2014 at 0:47