Interface: CreateFormOptions<FormDefinition>
Defined in: core/src/form/form-types.ts:36
Options of createForm.
Extends
Extended by
Type Parameters
| Type Parameter |
|---|
FormDefinition |
Properties
| Property | Modifier | Type | Default value | Description | Inherited from | Defined in |
|---|---|---|---|---|---|---|
focusElement? | readonly | FocusElementOption | element => element.focus() | How an element is focused, for error focus and node.focus(). | FormDefaults.focusElement | core/src/form/form-types.ts:26 |
formatError? | readonly | FormatErrorOption | error => error.code | Turns an error into text, for errorMessage and error summaries. | FormDefaults.formatError | core/src/form/form-types.ts:28 |
id? | readonly | string | formtree-<counter> | Prefix of every DOM id in the form, as in checkout:contact.email. | - | core/src/form/form-types.ts:38 |
initialValue? | readonly | DeepPartial<DraftOf<FormDefinition>> | undefined | The starting draft. It may be partial; anything left out starts empty. | - | core/src/form/form-types.ts:40 |
mode? | readonly | ValidationMode | 'onTouched' | When errors become visible. Definitions can override it. | FormDefaults.mode | core/src/form/form-types.ts:15 |
reValidateMode? | readonly | ReValidateMode | 'onChange' | When errors update after a node that contains them is submitted. Until then, mode decides. Definitions can override it. | FormDefaults.reValidateMode | core/src/form/form-types.ts:22 |
shouldFocusError? | readonly | FocusErrorOption | true | Where focus goes after a failed submit. | FormDefaults.shouldFocusError | core/src/form/form-types.ts:24 |