Possible Duplicate:
Can I apply the required attribute to <select> fields in HTML5?
I'm using the html5 contact form from here but I'm having issues trying to make the <select>
field required. Everything else works fine, just having trouble with this and the dev hasnt responded when I asked about the field. this is what I have
<select name="package" id="package" title="Please choose a package" class="required">
<option value="">------------------</option>
<option value="basic">Basic</option>
<option value="plus">Plus</option>
<option value="premium">Premium</option>
</select>
What am I missing to get this working correctly?
I believe that the top answer to this question is what you're looking for. To quote,
This works for me - Have the first value empty - required works on empty values.
<select required> <option value="">Please select</option> <option value="one">One</option> </select>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With