=== Savelo Form Autosave ===
Contributors: martinetproparis
Tags: form, autosave, draft, localStorage, contact form 7
Requires at least: 5.9
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Automatically saves form data to localStorage and restores it when the visitor returns. Zero server load. Works with any HTML form.

== Description ==

**Savelo Form Autosave** silently saves everything visitors type in your forms: text, email, number, textarea, select, checkbox, radio and brings it back if they navigate away and return, close the tab by accident, or their browser crashes.

All data is stored exclusively in the visitor's own browser (localStorage). Nothing is ever sent to your server. Zero database queries on the front end.

= Features =

* **Universal form support** works with any HTML `<form>` element
* **Smart exclusion** automatically skips login, registration, password reset, and WooCommerce checkout forms
* **Security-first** never saves password fields; respects `autocomplete="off"`
* **Contact Form 7** saved draft is cleared automatically after a successful AJAX submission
* **Configurable expiry** 1 to 90 days; expired drafts are cleaned up silently
* **Restore notification** optional, auto-dismissing, fully customisable message
* **Clear on submit** optionally delete the draft when the form is submitted
* **Custom exclusions** exclude any form by CSS selector, by adding the `savelo-exclude` class, or the `data-savelo-exclude` attribute
* **Zero front-end dependencies** vanilla ES5 JavaScript, no jQuery required
* **Assets on demand** scripts and styles are never loaded in wp-admin
* **Translation ready** `.pot` file included
* **Clean uninstall** all plugin data removed when you delete the plugin

= Privacy =

All form data is stored in the visitor's own browser via the localStorage API. No data is transmitted to your server or any third party. Compatible with GDPR-aware workflows. Users can clear their localStorage at any time via their browser settings.

= How to exclude a form =

1. Add `data-savelo-exclude` attribute directly to the `<form>` tag, **or**
2. Add the CSS class `savelo-exclude` to the `<form>` tag, **or**
3. Enter a CSS selector in **Settings → Form Autosave → Exclude Forms**

== Installation ==

1. Upload the `savelo-form-autosave` folder to `/wp-content/plugins/`, or install via **Plugins → Add New**.
2. Activate the plugin through the **Plugins** screen.
3. Go to **Settings → Form Autosave** to adjust options (the defaults work for most sites).

== Frequently Asked Questions ==

= Does this plugin store form data on my server? =

No. All data is kept exclusively in the visitor's browser using the Web Storage (localStorage) API.

= Which form plugins are supported? =

Any standard HTML form works out of the box. Contact Form 7 has enhanced support: the saved draft is automatically cleared after a successful AJAX submission via the `wpcf7mailsent` event.

= Can I exclude specific forms? =

Yes, three ways: add `data-savelo-exclude` or the `savelo-exclude` CSS class directly to the `<form>` element, or enter CSS selectors in the settings page.

= Does this work with WooCommerce? =

The WooCommerce checkout form is excluded by default. Other WooCommerce forms (e.g. account registration) are saved normally, you can exclude them individually if needed.

= Is this GDPR compliant? =

The plugin stores data only in the visitor's own browser. No data leaves their device. Users can clear it at any time via browser settings. You may still want to mention localStorage usage in your privacy policy.

== Screenshots ==

1. Settings page, clean, native WordPress design.
2. Frontend restore notification, discreet, auto-dismissing after 6 seconds.

== Changelog ==

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.0 =
Initial release.
