Automatically saves as you type with smart debouncing
Excludes passwords and sensitive fields automatically
Highly customizable with extensive options
<!-- Add class to your form -->
<form class="form-autosave" id="myForm">
<input type="text" class="form-control" name="name">
<button type="submit" class="btn btn-primary">Submit</button>
</form>
<!-- Include the script -->
<script src="formAutoSave.js"></script>
formAutoSave.saveForm('demoForm');
formAutoSave.clearForm('demoForm');
formAutoSave.saveAllForms();
formAutoSave.clearAllForms();
formAutoSave.export('demoForm');
formAutoSave.getStorageInfo();
| Option | Default | Description |
|---|---|---|
formSelector |
'.form-autosave' |
CSS selector for forms |
statusSelector |
#statusbar |
Global status element |
storagePrefix |
form_autosave_ |
Prefix for storage keys |
debounceDelay |
500 |
Delay in milliseconds |
maxAge |
7 days |
Data expiration time |
useSessionStorage |
false |
Use sessionStorage instead of localStorage |
useSilentMode |
false |
Auto-restore without prompt |
showNotifications |
true |
Show save status indicators |