0

How can I create a drop down list that doesn't show when You expand the drop down list? (because the first element has text "Please make selection" and no value. Plus, it looks bad with the please select in the list right under the same text.

FIre Panda
  • 6,537
  • 2
  • 25
  • 38
Meme
  • 313
  • 1
  • 3
  • 4

2 Answers2

0

You can either create an option group (example here) so that it's not selectable, or just leave the first option blank and add your own validation for the dropdown. A blank one would just be:

<option value="-1"></option>
Kon
  • 27,113
  • 11
  • 60
  • 86
0

It isn't possible immediately from the server-side. You'll have to include a special option, and add some CSS and javascript. See this question for a solution (and check out the JsFiddle he added).

Community
  • 1
  • 1
Peter
  • 13,733
  • 11
  • 75
  • 122