Form
Group input fields in a form and submit them together. It supports scaling scale with content or remaining a fixed size with overflow options, and can check the validation status of nested input fields, clear on submission.
Form can generate the necessary input fields for a specified resource database table.
Properties
Available properties for Form with supported data types or values. You can write JavaScript almost anywhere in Retool to manipulate or read information about components.
The source data for the component. It contains a key-value list of all current input fields, by formFieldKey
, and their current values.
Whether to disable form submission.
Whether user input, interaction, or selection is disabled.
Whether the container is in full bleed mode, where it can only contain a single component which expands to fit the available space.
The amount of padding used within the footer.
The amount of padding used within the header.
Whether the height automatically resizes to fit content or is a fixed size.
Whether the component is visible.
Whether to display a loading indicator whenever nested components are fetching data.
The data to populate as default values for input fields, by formFieldKey
.
Whether the current value has failed any validation rules.
Whether to display a loading indicator.
Whether the component takes up space on the canvas if hidden
is true
.
The amount of margin to render outside of the component.
The overflow behavior when the contents exceeds the height of the component. Either scroll
to display a scrollbar or hidden
to clip the contents.
The amount of padding used within the container.
Whether all input fields must be valid for the form to submit. If valid
is false
for any input field, the Invalid event handler is triggered instead.
Whether to reset input field values using initialData
after form submission.
Whether to display the body of the component if heightType
is auto
.
Whether to show the border around the component.
Whether to display the footer area of the component.
Whether to show the border above the footer area.
Whether to display the header area of the component.
Whether to show the border under the header area.
Whether the component remains visible in the editor if hidden
is true
.
Whether the Submit event handler is currently running.
The text to display in a tooltip on hover or focus.
Events
Events are triggered by user interactions with Form. Use event handling to trigger queries or other actions in response to events.
A user submits the current value.
Methods
Methods for interacting with Form. You can write JavaScript almost anywhere in Retool and use methods to manipulate data or components.
Scrolls the canvas or parent container so that the selected component appears in the visible area.
Set showBody value for the container
Set showHeader value for the container
Set showFooter value for the container
Set the hidden
value to toggle whether the component is visible. Defaults to true
without a parameter.
Set the disabled
value to toggle whether the input field is disabled. Defaults to true
without a parameter.
Submit the form
Set the values of all child inputs
Clear the current values of all child components.
Reset all child inputs with formDataKey
to their default values or clears them if no default value is set
Validate the form.
Clear the validation state of the form.