Skip to main content

Form

The Form component allows you to create a form and get answers from the user.

Form API

The following section details Form component's specific settings. For more details on the App editor, check the dedicated documentation or the App editor Quickstart:

Data source

Fields are called property, they can be added as eval or connected to other components. They can be seen and filled as JSON.

Controls

This component can be controlled by frontend scripts using these functions:

setValue

The setValue function is meant to set or force the value of a component. This can be convenient in cases where connection is not the easiest pattern. Note that it's a bad idea to mix dynamic default value and setValue together.

setValue(id: string, value: any)

validate

Make a specific field of a form in a Validate state.

validate(id: string, key: string)

validateAll

Make all fields of a form in a Validate state.

validateAll(id: string, key: string)

invalidate

Invalidate a specific field of a form

invalidate(id: string, key: string, error: string)

Form configuration

NameTypeConnectableTemplatableDefaultDescription
Display TypebooleantruefalsefalseThis will display the type and/or the format on the field next to the label.
Large GapbooleantruefalsefalseThis will add a large gap between the field elements.
Default valuesobjecttruefalseThis enables setting default form values dynamically using an object: keys are field names, and values are the defaults.
Default enumsobjecttruefalseThis enables setting form enum values dynamically using an object: keys are field names, and values are arrays of strings.

Each argument can be configured (name, description, type, default value, advanced parameters).

Form Arguments

Outputs

NameTypeDescription
propertiesstringType, description and default of each argument.
loadingbooleanThe loading state of the text component.
validboolean
valuessame as each argumentValue of each answer by the user.