[whatwg] Simple solution for select editable

    I've come up with a simple solution that allows <select editable> to 
degrade gracefully in Web Forms 2.0. Just put the extra text box in a 
repetition template that has zero instances:

<select editable="editable" name="thing">
   <option>1</option>
   <option>2</option>
   <option>3</option>
</select>
<span repeat="template" repeat-start="0">
   or you can type a new entry: <input type="text" name="thing_new">
</span>

    In non-WF2 user agents, "editable" is ignored and the <span> is 
rendered, allowing the user to put a custom entry in the text box. In a 
WF2 UA, only the <select> is shown, but it's rendered as a combo box. 
(Finally something good comes out of this stupid template defect!)

Received on Tuesday, 29 June 2004 06:37:41 UTC