Skip to main content

Component reference

The following properties is available to all components:

NameTypeDescription
attributesRecord

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.

componentsFormComponentsList

Group components can have subcomponents that are rendered as part of the component. They should be provided here as a list of components.

descriptionstring

A descriptive text for this component. This can be small help text to help the user understand what to input into the form.

disabledboolean

Disables this input component if set to true.

labelstring

The label for this component. Normally this will be displayed in a HTML label tag.

maxItemsnumber

The maximum number of items that needs to be provided for this component when it's set to be multiple.

minItemsnumber

The minimum number of items that needs to be provided for this component when it's set to be multiple.

multipleboolean

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.

multipleWidgetMultipleWidget

The widget to use for this component when it's set to be multiple.

namestring

The name for this component. This will be used as the name on the form HTML element in the form.

requiredboolean

If set, then the form can't be submitted without any data for this component.

rulesAnyRule[]

A list of rules to determine if this component should be visible or not. See the [/docs/guide/rules](Rules guide) for more info.

settingsSettingsType

Component-specific settings. Check each component to know what settings are available.

typeFormComponentType

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.

validatorsValidator[]

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.

widgetWidget

The widget to use for this component. The component will be rendered using this widget.