Parameters
Properties passed to the Form.useSubmit hook.
| Type | Description | |
|---|---|---|
id | SharedStateId | (optional) Optional id (string, function, object or React Context) to link to a Form.Handler outside the component tree. When provided, the hook can be used without being inside Form.Handler. |
Return Values
Properties and methods returned from the Form.useSubmit hook.
| Type | Description | |
|---|---|---|
submit | () => Promise<EventStateObject | undefined> | (required) Triggers form submit. Runs validation and calls the form's onSubmit when valid. Use when the submit button is rendered outside Form.Element (e.g. in a modal footer). Returns a Promise that resolves with the submit result or undefined. |