[html5] New attribute for SELECT element

Ian Hickson ian at hixie.ch
Fri Feb 11 14:28:17 PST 2011


On Wed, 17 Nov 2010, Antonio Aristides Mochi Junior wrote:
> 
> Is just me, or anyone miss an attribute for SELECT elemento to allow a 
> "free write" on element, just like a suggestion box.
> 
> Today the SELECT can be used to pick just elements provides by OPTIONS 
> embedded in.
> 
> If I want, for example, a combo box with names of some colors and allow 
> user to select one of then or type a new one, I have to use an INPUT 
> (type=text) and a hidden SELECT.
> 
> A new attribute for SELECT, for examplo named "editable", makes the 
> entry of this element editable like INPUT. The value returned on form 
> request would be the text of element, not de VALUE attribute of selected 
> OPTION.

Actually we've added this now:

  <label>Colour name: <input type=text name=colour list=colours></label>
  <datalist id=colours>
   <option value="Red">
   <option value="Green">
   <option value="Blue">
  </datalist>

Try it in Firefox (might have to wait for Firefox 4 or use the nightlies) 
or a recent version of Opera.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'



More information about the Help mailing list