jQuery Dirty Forms
Categories
Component ID
1495354
Component name
jQuery Dirty Forms
Component type
module
Maintenance status
Development status
Component security advisory coverage
not-covered
Component created
Component changed
Component body
This module implements the jQuery Dirty Forms library (http://mal.co.nz/code/jquery-dirty-forms/) which provides a more robust and flexible approach to alerting users when they attempt to leave a page with unsaved changes.
The main benefit of this module over other dirty form libraries is that this one allows you to define custom dialog boxes in newer browsers with a fallback to the browser's default dialog box on older browsers.
WARNING: This module does not correctly work with the most recent version of the jquery.dirtyforms library on GitHub when the Drupal Overlay module is enabled. I'm working on an update to resolve this issue.
Dependencies
- Libraries 1.x (http://drupal.org/project/libraries)
- jQuery.DirtyForms library (https://github.com/snikch/jquery.dirtyforms or https://github.com/ssmiley483/jquery.dirtyforms)
- jQuery LiveQuery plugin (http://brandonaaron.net/code/livequery/docs)
- Will take advantage of the Variables module (http://drupal.org/project/variable) if enabled.
Features/Status
- Allows defining a global default text (Title, Message, and button text) for the dialog box.
- Dialog text is fully translatable via i18n String/Variable translation.
- Allows enabling the check globally, on specific forms, or on specific pages.
- (FUTURE) Allow defining multiple custom dialogs that are assigned on a per page or per form basis.
Limitations
- Currently the library doesn't detect and prevent users from clicking the refresh or back button in the browser. But all other page unload events should be handled.
- Currently the library does not work if the form is displayed in the Drupal overlay.

