FormHandle interface

Module @runic-artifex/svelte in @runic-artifex/svelte 0.23.0

interface FormHandle extends FormState

A form bound by useForm: its state, read reactively, and its actions.

Methods

submit

submit<T>(command: () => T | PromiseLike<T>, options?: FormSubmitOptions): Promise<FormSubmitResult<T>>;

Commits every field, waits for their writes and runs command unless a field's write or text failed.

commit

commit(): Promise<FormState>;

Commits every field and resolves once their writes settled.

reset

reset(): void;

Resets every field.