# @opensky/remotes > `enhancedForm` wraps a SvelteKit remote form function with the behaviors every real form ends up needing — submission state, inline validation UX, draft persistence, and auto-submit — all wired up with a few spreads. - Human docs: https://opensky.lightdance.dev - Changelog: https://opensky.lightdance.dev/changelog - Source & issues: https://github.com/open-sky-dev/opensky-remotes - Install: `npm i @opensky/remotes` - Requires `@sveltejs/kit` >= 2.68.0 and `svelte` >= 5.29.0 ## Guide Provides `enhancedForm`, a helper that improves the behaviors and experience of working with [remote form functions](https://svelte.dev/docs/kit/remote-functions#form). One object wraps a remote form with: - **Submission state** — an exclusive state machine (`idle`/`pending`/`issues`/`error`/`result`, plus opt-in `delayed`/`timeout`) with semantic lifecycle callbacks - **Inline validation UX** — issues appear when a dirty field loses focus and clear as soon as the value is valid again, with custom sync/async validators per field - **Draft persistence** — opted-in fields save to web storage as the user types and restore after a reload - **Auto-submit** — the form submits itself once input settles, for save-button-less forms Requires `@sveltejs/kit` 2.68.0 or newer (targets the current remote form `enhance` instance API) and `svelte` 5.29 or newer (uses attachments). A runnable demo app lives in [`examples/contact-form`](examples/contact-form) — see its README for setup. ## Usage ```svelte
State: {form.state}
{#if form.timeout}Request timed out
{/if} ``` Three kinds of spreads wire everything up: - `{...form.handlers}` on the ` ``` ## Details There is currently a [lot of change](https://github.com/sveltejs/kit/discussions/14288) with svelte's remote functions and with form validation. We use a very newly added `preflightOnly` flag for validation calls to avoid making calls to the server to validate on every keystroke however there seem to be [bugs](https://github.com/sveltejs/kit/discussions/14288#discussioncomment-14743807) in the current implementation including that we don't get server issues until you submit the form (we should be getting them on blur). We also have some buggy behavior after a submit if the server sends back validation issues (and doesn't run the remote function), we do show those issues, however they currently all get cleared when you mutate the form. This is not desired. We want to clear only the issues for the field that mutates after server sends back issues.