Introduction

Form Async is the simplest, fastest way to send ajax request when form changes. A great jQuery solution to preventing data loss when filling out a web form.

Write some texts and unblur the input to see the result.

Features

  • 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.

Getting Started

1. Installation

Download the latest release, or better yet install it with npm.

2. Including it on your page

Include jQuery and the plugin on a page. Then select a form to synchronise and call the async method.

<form action="ajax.html">
   <input name="xs_username">
</form>

<script src="jquery.js"></script>
<script src="form-async.js"></script>
<script>
   $("form").async();
</script>

Alternatively include jQuery and the plugin via requirejs in your module.

define(["jquery", "form-async"], function($) {
   $("form").async();
});