-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
A project has requested an "autosave" feature for a form. We should implement a module that autosaves forms to local storage and restores them when the page is reloaded. There should be an API to clear the saved form data.
- Thinking that the key names could be determined based on the field names.
- By default, I would say that the form should autosave on keyup, debounced.
Some ideas around sample usage:
<form id="example">
<input type="text" name="title">
...
</form>
var autosave = require('airkit/forms/autosave');
var el = document.getElementById('example');
var options = {...}; // Whatever options we might have.
var autosaver = autosave.init(el, options);
autosaver.clear(); // Clears saved data.
Metadata
Metadata
Assignees
Labels
No labels