- From: Mounir Lamouri <mounir.lamouri@gmail.com>
- Date: Tue, 10 Aug 2010 11:35:21 +0200
On 08/10/2010 07:09 AM, Garrett Smith wrote: >> Many times you want the user to make an explicit choice, rather than >> just leaving whatever was already selected. What many websites do is: >> >> <label>Choose an option: >> <select> >> <option></option> >> <option>value 1</option> >> <option>value 2</option> >> <option>value 3</option> >> </select> >> </label> >> > > The first option should be selected, resulting in the select having > value="". If `required` is specified, and the user selects an empty > option (the first option in the list) and submits the form, what do > you think should happen? Like for <input> or <textarea>, if select.value is the empty string, the select element suffers for being missing. >> Or >> >> <select> >> <option value="">Choose an option:</option> >> <option>value 1</option> >> <option>value 2</option> >> <option>value 3</option> >> </select> >> > > What should happen if the SELECT has `required`? ditto -- Mounir
Received on Tuesday, 10 August 2010 02:35:21 UTC