Component reference
The following properties is available to all components:
Name | Type | Description |
---|---|---|
attributes | Record | Extra attributes to add to the form tag. For instance, if you want to add an extra aria tag to the form element, you can add it here. |
components | FormComponentsList | Group components can have subcomponents that are rendered as part of the component. They should be provided here as a list of components. |
description | string | A descriptive text for this component. This can be small help text to help the user understand what to input into the form. |
disabled | boolean | Disables this input component if set to true. |
label | string | The label for this component. Normally this will be displayed in a HTML label tag. |
maxItems | number | The maximum number of items that needs to be provided for this component when it's set to be multiple. |
minItems | number | The minimum number of items that needs to be provided for this component when it's set to be multiple. |
multiple | boolean | If this is true, then the data of this component will be an array of multiple values. Check the guide on rendering forms for more information. |
multipleWidget | MultipleWidget | The widget to use for this component when it's set to be multiple. |
name | string | The name for this component. This will be used as the name on the form HTML element in the form. |
required | boolean | If set, then the form can't be submitted without any data for this component. |
rules | AnyRule[] | A list of rules to determine if this component should be visible or not. See the [/docs/guide/rules](Rules guide) for more info. |
settings | SettingsType | Component-specific settings. Check each component to know what settings are available. |
type | FormComponentType | A reference to the component type definiton for this component. You usually don't have to set this yourself, the component creator function will provide it for you. |
validators | Validator[] | A list of validators to determine if the data inputted into this component is valid. See the [/docs/guide/validators](Validators guide) for more info. |
widget | Widget | The widget to use for this component. The component will be rendered using this widget. |