🚧Form (WIP)
The form is a versatile widget that allows the input of a wide range of data types and formats. [Expand intro]
Editor Type | Data type |
---|---|
Text Box | string |
Select Box | string |
Number Box | number |
Check Box | bool |
Password | string |
Tag Box | array |
Date/Time Select | date |
Color Select | number (hexadecimal) |
Location Select | geojson |
Radio Group | string |
Text Area | string |
Slider | number |
Switch | bool |
Some types of field inputs have extra options such as an option list or a default value.
Each field can be set as required and show an error message when it’s empty.
Properties
The form widget has a set of unique properties when linked to a function.
Passing data to the backend
From FormData
The default option when connecting the form to an input, it reads the form data as specified in the options.
From ValidationResult
Returns the result of validation in this format:
The isValid
variable can be used, for example, to prevent the app user from submitting a form without having completed the required field.
Setting actions from the backend
Call AutoFill
Automatically fills a specified form field with a value passed to the function.
Set Options
Some types of form fields have a list of values to select from. There are two ways to set the options, and one is using the set options
property. Drag an output onto the form and then select the “set options” property.
Call Validate
The call validate
property checks whether the information in the form is valid (required fields are filled, the inputs are in the correct formats etc.). After triggering a function with this property, the results can be accessed with the from validationResult
property.
Call Clear
The call clear
property clears the form inputs when triggered.
Last updated