Skip to main content

Form

Use a Form component to capture data from end users

All components placed inside of a Form will create a parent/child relationship with the Form component. This enables the Form to easily manage the child components.

Form Buttons

By default, Form components have two Form Buttons included, Reset and Submit, which are similar to Button components, but with special properties to interact with the Form component's children. The two properties that differentiate Form Buttons from Button components are Disabled Invalid Forms and Reset Form on Success.

Submit Form Button

By default, a Submit Form Button will have Disabled Invalid Forms and Reset Form on Success enabled. This means, that the Submit button will be disabled until all required components in the Form are filled out. Similarly, when the Submit button is clicked, all child components will be reset to their default values.

Example of how the reset Form on success works

Reset Form Button

A Reset Form Button interacts similarly to a Submit Form button, but the Disabled Invalid Forms is not toggled on by default, thus allowing users to reset all child components while filling out the form and start over.

Example of how the Reset Form Button works

Form Component Properties

PropertyDescription
Background ColorChanges the color of the background, takes in HTML color names, HEX, RBG, or RGBA values
VisibleControls the visibility of the component, values are a boolean
Scroll ContentsEnable scrollability within the Form component

Form Reference Properties for Components and APIs

Properties can be accessed from other frontend components and backend APIs by adding the name of the Form component, and dot referencing the property. For a Form named Form1:

PropertyDescription
Form1.isVisibleReturns the boolean value of the button's visibility (True, if it is visible)
Form1.dataReturns an object of the current state of the form (see example below)
Data object for a Form component

Form Button Properties

PropertyDescription
LabelSets the label of the button
Button StyleChanges the style of the button, options are "Primary", "Secondary", or "Danger"
Disabled Invalid FormsDisables the button when the parent form has a required component that is not filled, values are a boolean
Reset Form on SuccessResets the fields within the parent form when the click action succeeds, values are a boolean (see example here)
Loading AnimationControls the loading state of the component, values are a boolean
VisibleControls the visibility of the component, values are a boolean

Image showing the different button styles available:

Form button styles

Form Button Reference Properties for Components and APIs

Properties can be accessed from other frontend components and backend APIs by adding the name of the Form Button component, and dot referencing the property. For a Form Button named FormButton1:

PropertyDescription
FormButton1.isVisibleReturns the boolean value of the button's visibility (True, if it is visible)
FormButton1.isDisabledReturns the boolean value of the button's disabled state (True, if it is disabled)
FormButton1.textReturns the button's label as a string

Form Button Event Handler

Table Reference PropertyDescription
onClickTriggers an action when the button is clicked