[whatwg] Prefilling repetitions

Ian Hickson ian at hixie.ch
Tue Mar 13 13:27:08 PDT 2007


On Tue, 13 Mar 2007, Elliotte Harold wrote:
>
> In WF2 I can prefill a select list with external data pointed to by a data
> attribute like so:
> 
> <form>
>  <label>Choose the species:
>     <select name="species" data='examples/species.xhtml'></select>
>   </label>
>  <label><input type="submit" value="Send data" /></label></p>
> </form>
> 
> However it strikes me as funny that I can't prefill a repeating form. e.g.
> 
> <div id="observation" repeat="template">
>   <label>Species:
>     <input type="text" name="species[observation].name"
>            data="http://www.example.com/values.html"/>
>   </label>
> </div>
> 
> At least I don't think I can.

I have no idea what you're trying to do here. If you're trying to prefill 
the _select_ widget, then you can do that to any select widget, whether in 
a repetition template or not. If you're trying to prefixx a _form_, then 
you do that at the form level, and the spec describes how it works for 
repetition fields. I have no idea what you would mean by a "data" 
attribute on an <input> element, though.

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



More information about the whatwg mailing list