This page hosts a demo of the jQuery Are-You-Sure plugin (
Are-you-sure is simple light-weight "dirty forms" JQuery Plugin for modern browsers. It helps prevent users from loosing unsaved form changes.
This example shows how easy it is to add a dirty check to your form(s) with one line of code. (View the page's source)
This example highlights how to disregard a field from the dirty check. In this form the first field is dynamically populated and hence a change on this field should not mark the form as dirty.
This is a more advanced example. The
clean change events are
intercepted so the save button is only enabled if the form is dirty (i.e. something to save).
It also demonstrates how to customize the warning message and change the style of a dirty
form (CSS styling using the
In this example we'll dymaically add a field and fire off the
rescan event. After
the rescan, Are-You-Sure will start looking for changes on the new fields as well.
This example demonstrates tracking of hidden and disabled form elements that are changed by non-input elements. E.g.:
This example shows support for HTML5 input types. It's not a coffee order form, but you need coffee if you're working with HTML5 :-)
This example shows how you can mark the current state as not dirty. Handy for AJAX forms we're you're managing your own submits.
This jQuery plugin is developed by Chris Dance at PaperCut Software - Are-You-Sure is used in PaperCut's printing management software and it has been open sourced with help of Tom, Jack and Matt from PaperCut's dev team.