Digital Sovereignty for everyone

How it works

On the front end the plugin loads one small script module, which waits until the browser is idle. Values are kept only in the visitor’s own browser, in IndexedDB through the shared idb-keyval module. Nothing is sent to the server.

Per-page fields

Fields matching the local selectors (by default #comment) are saved as the visitor types, keyed by the page URL without its fragment and by the field’s ID, so they need an ID. If the visitor comes back to the same page before submitting, the text is put back. Submitting the form clears it.

Site-wide fields

Fields matching the global selectors (by default input[type="email"] and input[autocomplete="name"]) are saved when they change, keyed by the selector, and filled in on any page of the site where a matching field is empty. They’re kept after submitting. If a field matches both lists, it is treated as site-wide.

A saved value only fills an empty field. Passwords, hidden fields, files, checkboxes, radio buttons and buttons are never stored, and only fields inside a form are handled.

Filters

  • lh_persistent_forms_return_local_selectors: array of CSS selectors for per-page fields.
  • lh_persistent_forms_return_global_selectors: array of CSS selectors for site-wide fields.
  • lh_persistent_forms_should_load: whether to enqueue the module on this request (front end only by default).
  • lh_persistent_forms_init_plugin: return false to switch the plugin off without deactivating it.

The idb-keyval library

The module imports idb-keyval. When LH idb-keyval is active, every plugin shares its copy. Otherwise the plugin registers its own bundled idb-keyval 6.3.0, and Site Health and the Plugins screen say so. Requires WordPress 6.7 or later, for script module data.

If you like this plugin please consider making a donation to further development

Install LHero.org

lhero.org

Open it straight from your home screen, full screen and quicker to load.

  1. Tap the Share button . If you cannot see it, tap ••• first.
  2. Scroll down and tap Add to Home Screen.
  3. Tap Add.
  1. Tap the browser menu â‹®.
  2. Tap Install app or Add to Home screen.
  1. In the menu bar, choose File, then Add to Dock.

Use your browser's menu to install this site or add it to your home screen.