Form repetition Javascript Library
This library roughly implements the form repetition as described in WHAT-WG
Web Forms 2.0 spec.
This is an example of a repeating form. Hit "Add a contact" to
get started.
To-Do
- Forms are submitted with the template fields as well (which are
hidden, but not removed from the DOM -- should they be removed?)
- Orphaned repetition blocks? Beats me how they should
work.
- Events should be fired.
- Maybe there's some way that
<input
type="add"> should work (as opposed to <button
type="add">, but I'm not sure how, since browsers will
treat these as text inputs.
- Attributes that start with U+FEFF are not ignored with respect
to template attribute substitution (as described in 3.6.1, step
11). Also some other characters besides [] are supposed to be valid
for substitution (U+02D1 and U+00B7).
- According to spec the ID for the repetition block (which
contains the template name) should simply be removed; I rename it
with an index.
Spec examples
From 3.7.1:
From 3.7.2:
ianb@colorstudy.com
Last modified: Wed Oct 26 00:28:22 CDT 2005