The Form component for Retool Mobile
A form to group and submit input fields.
Properties
All properties for this object with supported data types or values. You can write JavaScript almost anywhere in Retool to manipulate or read property values.
align
The horizontal alignment of the contents.
Type | string | ||||||||
Format | Plain Text | ||||||||
Mutability |
| ||||||||
Allowed Values |
| ||||||||
Default |
|
Examples
data
The data.
Type | string | number | boolean | object | array | ||||||
Format | Custom data | ||||||
Mutability |
|
disabled
Whether input, interaction, selection, or triggering is disabled.
Type | boolean | ||||||
Format | True/False | ||||||
Mutability |
| ||||||
Default |
|
Examples
disableSubmit
Whether to disable form submission.
Type | boolean | ||||
Mutability |
|
enableFullBleed
Whether to expand the contents to fill available space.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
| ||||
Default |
|
Examples
footerPadding
The amount of padding used within the footer.
Type | string | |||||||||
Format | Plain Text | |||||||||
Mutability |
| |||||||||
Allowed Values |
| |||||||||
Default |
|
Examples
gap
The gap between components.
Type | string | ||||||||||||||||||||||||
Mutability |
| ||||||||||||||||||||||||
Allowed Values |
|
headerPadding
The amount of padding used within the header.
Type | string | |||||||||
Format | Plain Text | |||||||||
Mutability |
| |||||||||
Allowed Values |
| |||||||||
Default |
|
Examples
hidden
Whether this object is hidden from view.
Type | boolean | ||||||
Format | True/False | ||||||
Mutability |
| ||||||
Default |
|
Examples
hoistFetching
Whether to display a loading indicator whenever nested objects are fetching data.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
| ||||
Default |
|
Examples
id
The unique identifier (name).
Type | string | ||||
Format | Plain Text | ||||
Mutability |
| ||||
Default |
|
Examples
initialData
The data used to populate default values for input fields.
Type | array |
Array values | object |
Mutability | Read-only |
isHiddenOnDesktop
Whether to show or hide this object in the desktop layout.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
| ||||
Default |
|
Examples
isHiddenOnMobile
Whether to show or hide this object in the mobile layout.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
| ||||
Default |
|
Examples
justify
The horizontal alignment of the contents.
Type | string | ||||||||||
Mutability |
| ||||||||||
Allowed Values |
|
layout
The layout of content.
Type | string | ||||||
Mutability |
| ||||||
Allowed Values |
|
loading
Whether to display a loading indicator.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
| ||||
Default |
|
Examples
maintainSpaceWhenHidden
Whether to take up space on the canvas if hidden
is true
.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
| ||||
Default |
|
Examples
margin
The amount of margin to render outside.
Type | string | |||||||||
Format | Plain Text | |||||||||
Mutability |
| |||||||||
Allowed Values |
| |||||||||
Default |
|
Examples
padding
The amount of padding to render inside.
Type | string | ||||||
Format | Plain Text | ||||||
Mutability |
| ||||||
Allowed Values |
| ||||||
Default |
|
Examples
requireValidation
Whether all input fields must be valid to submit. If valid is false
for any input field, the Invalid event handler is triggered.
Type | boolean |
Mutability | Read-only |
resetAfterSubmit
Whether to reset input field values using initialData
after form submission.
Type | boolean |
Mutability | Read-only |
showBorder
Whether to show a border.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
| ||||
Default |
|
Examples
showFooter
Whether to show the footer area.
Type | boolean | ||||||
Mutability |
|
showFooterBorder
Whether to show a border above the footer.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
|
Examples
showHeader
Whether to show the header area.
Type | boolean | ||||||
Format | True/False | ||||||
Mutability |
| ||||||
Default |
|
Examples
showHeaderBorder
Whether to show a border under the header.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
| ||||
Default |
|
Examples
showInEditor
Whether the component remains visible in the editor if hidden
is true
.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
| ||||
Default |
|
Examples
tooltipText
The tooltip text to display next to the label on hover.
Type | string | ||||
Format | Markdown | ||||
Mutability |
| ||||
Default |
|
Examples
Methods
JavaScript API methods for this object. You can write JavaScript almost anywhere in Retool and use methods to manipulate data and property values.
form.clearValidation()
Examples
form.reset()
Examples
form.setDisabled()
Set the disabled
value to toggle whether the input field is disabled. Defaults to true
without a parameter.
form.setDisabled(disabled)
Parameters
Examples
form.setHidden()
Set the hidden
value to toggle whether the component is visible. Defaults to true
without a parameter.
form.setHidden(hidden)
Parameters
Examples
form.setShowBody(showBody)
Parameters
Examples
form.setShowFooter(showFooter)
Parameters
Examples
form.setShowHeader(showHeader)
Parameters
Examples
Events
Events triggered by user interactions. You can configure event handlers in the IDE to trigger queries or other actions in response to events.
Event | Description |
---|---|
Invalid | A value is invalid. |
Submit | The value is submitted. |