The simplest, fastest way to send ajax request when form changes.
npm install form-asyncForm Async is an easy-to-use library that provide acronymous sending on form changes. It's a great solution to preventing data loss when filling out a web form.
- Lightweight (~1.5kb gziped)
- Saves any HTML form element
- Support content editable property
- Full customization
- Retry functionality if ajax request fail
- Send form elements as group of field
- Provide the way to validate changes before sending ajax request
- Heavily tested
`` bash`
$ npm install form-async
We recommend installing from npm and then using a module bundler such as RequireJS, Webpack or Browserify.
Alternatively, you can use jsdelivr CDN instead of npm.
`html
`Documentation
Read the docs for more details on how to use Form Async.
— pre-request function that can be use to validate data before it is sent — function invoked if the request succeeds