[whatwg] [wf2] Filtering datalist with pattern

Matthew Raymond mattraymond at earthlink.net
Wed Aug 23 21:02:49 PDT 2006


Ian Hickson wrote:

> Could you give an example of this? It seems like the common cases, like 
> picking named values, would be handled by label="" vs value="":
> 
>    1:<input type="number" name="gauge" list="gauges" min="0" step="any">
>    <datalist id="gauges">
>     <option label="Z" value="220">
>     <option label="N" value="160">
>     <option label="HO" value="87">
>     <option value="8">
>    </datalist>

   Yeah, I suppose that would be fine, except for extremely rare cases
where the value absolutely has to be outside the pattern. The following
don't have fixed-length numeric values, for instance:

| <datalist id="math">
|   <option label="i" value="sqrt(-1)">
|   <option label="π" value="pi">
|   <option label="e" value="e">
| </datalist>

   I'm not entirely sure if they're a big enough deal to bother with.
The |label| attribute really would fix most problems. Now all we have to
do is get a vendor to implement |label| properly. :(



More information about the whatwg mailing list