Answers for "bootstrap selectbox show Nothing selected placeholder"

2

html select placeholder

//<select> tag doesn't have any placeholder attribute.
//But you can make a placeholder by making
//your first option disabled and selected.
//Maybe you would want that option to be hidden,
//just add hidden
  //in Angular you need to add value="undefined"
<select name="gender" required>
  <option value="" selected disabled hidden>Select a Gender</option>
  <option value="Female">Female</option>
  <option value="Male">Male</option>
  <option value="Intersex">Intersex</option>
  <option value="Trans">Trans</option>
  <option value="Non-Conforming">Non-Conforming</option>
  <option value="Personal">Personal</option>
  <option value="Eunuch">Eunuch</option>
</select>
Posted by: Guest on December-28-2020

Code answers related to "bootstrap selectbox show Nothing selected placeholder"

Browse Popular Code Answers by Language