Proof of concept that modern browsers will enforce select required, default option disabled on form submit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<body> | |
<form method="GET" action="https://duckduckgo.com/"> | |
<select name="q" required> | |
<option value="" disabled selected>Pick an option</option> | |
<option value="duck">Duck</option> | |
<option value="duck">Cat</option> | |
<option value="duck">Bear</option> | |
</select> | |
<input type="submit"></input> | |
</form> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment