Web component / unpkg

<form-saver>

See the README for installation and API documentation.

This page calls the guarded definition helper. Use invented details: localStorage keeps drafts on this device. Retention choices affect post-submit data, not draft saving.

Without JavaScript, or if the CDN module fails, the native form still works, but drafts aren’t saved. Keep a copy before leaving. The placeholder /demo-contact endpoint has no submission service.

Explicit registration helper

import { defineComponentName } from
  'https://unpkg.com/@aarongustafson/form-saver@latest/define.js?module';
defineComponentName();

<form-saver storage-key="demo:unpkg">
  <form action="/demo-contact" method="post">
    <label>Name <input name="name"></label>
    <label>Email <input name="email" type="email"></label>
    <button type="submit">Send</button>
  </form>
</form-saver>