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.

Contact Name:
Phone number: Type:


  1. Forms are submitted with the template fields as well (which are hidden, but not removed from the DOM -- should they be removed?)
  2. Orphaned repetition blocks? Beats me how they should work.
  3. Events should be fired.
  4. 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.
  5. 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).
  6. 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:

Name Number of Cats

From 3.7.2:

Solar system


  1. Moons
Last modified: Wed Oct 26 00:28:22 CDT 2005