[whatwg] Simple solution for select editable
voracity
subs at voracity.org
Tue Jun 29 07:00:01 PDT 2004
Matthew Raymond wrote:
> 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>
This would work as well. You would need to add a 'newname' attribute to the
select, or make newly entered values be sent with a name produced by adding
'_new' to the end of the select name.
It's not explicit about how it degrades (it relies on the editable attribute,
and repetitions being introduced to UAs together), but I don't think that's a
big issue.
More information about the whatwg
mailing list