jQuery plugin for dynamically adding/removing forms from Django formsets
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
tests
.editorconfig
.gitignore
.jshintrc
.travis.yml
AUTHORS.md
CONTRIBUTING.md
Gruntfile.js
LICENSE
README.md
package.json

README.md

jQuery Django Formset

Build Status Coverage Status

Usage

Basic Usage:

$('table.my-formset').djangoFormset({
  tagName: 'tr',
  deleteSelector: '.delete-form',
  addSelector: '.add-form'
});

Advanced Usage:

$('table.my-formset').djangoFormset({
  tagName: 'tr',
  className: 'form',
  emptyFormSelector: 'tr.empty-form',
  deleteSelector: '.delete-form',
  addSelector: '.add-form',
  minForms: 1,
  added: function (form) {
    // Code that gets executed when form is added
  },
  deleted: function (form) {
    // Code that gets executed when form is deleted
  }
});

Contributing

Please read the CONTRIBUTING.md file before submitting an issue or pull request.

License

Distributed under MIT License