ppendo is a lightweight plugin to manage cloning form rows.
Appendo is less than 2000 bytes and is very easy to use.
- Creates an interface to manage adding cloned form rows
- Remove button appears when added rows can be removed
- Optionally limit the number of rows that can be added
- Optionally focus first form field in added row
- Lightweight, less than 2K! Well-commented source
- Can be styled by CSS rules or via jQuery properties object
- Completely namespaced as jQuery.appendo
Appendo aims to be a lightweight solution to duplicating form rows in a simple jQuery plugin format. The appendix includes some PHP example code for naming and reading rows.
Appendo also aims to be a succinct example of jQuery plugin design (see code).
It’s very simple to attach Appendo.
- Set up the row for duplication as the final row in a table
- You may use header rows or other layout in the table above the row
- Simply add class="appendo" to the table with to duplicate
If you’ve loaded jQuery and Appendo correctly, Appendo will automatically attach to tables withclass="appendo". It’s that easy!
Demo / Download