Editable Text
A click-to-edit input field to enter a single line of text. Editable Text functions similarly to Text Input but is rendered as static text when not being edited. It can perform validation of required field, minimum or maximum length, email and URL formats, regular expression patterns, and custom rules.
Editable Text can automatically capitalize or check spelling, and supports browser autofill types.
Properties
Available properties for Editable Text with supported data types or values. You can write JavaScript almost anywhere in Retool to manipulate or read information about components.
The current value.
Whether the browser can automatically capitalize text in the input field when using virtual or on-screen keyboards.
Whether the browser can perform autocomplete on the input field.
The data type of the input field for browsers to autofill if autoComplete
is true
.
The icon to display that indicates an editable value.
The key used by a Form component to assign default values to input fields using form.initialData
, and to construct the form.data
property.
Whether the component is visible.
Whether to hide the validation message if the invalid
is true
.
The icon to display after the primary content.
The icon to display before the primary content.
The tooltip text to display below the input field on focus.
The current or most recently entered value of the input field.
Whether the current value has failed any validation rules.
The text to display as a label for the input field.
The horizontal alignment of the label.
The additional text to display with the label.
The position of the label relative to the input field.
The label width, in the unit specified in labelWidthUnit
.
The specified units for labelWidth
.
Whether the label can wrap to multiple lines.
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 maximum number of characters to allow.
The minimum number of characters to allow.
A JavaScript regular expression, without forward slashes around the pattern, to validate input if patternType
is regex
.`
The pattern with which to validate the input.
The text to display in the input field when empty.
Whether the value is read only and cannot be modified.
Whether the input is required for validation.
Whether to display a button to clear the current value of the input field.
Whether the component remains visible in the editor if hidden
is true
.
Whether the browser can perform spellcheck on the input field.
The text to display after the primary content.
The text to display before the primary content.
The text to display in a tooltip on hover or focus.
The validation message to display if the input is invalid.
Events
Events are triggered by user interactions with Editable Text. Use event handling to trigger queries or other actions in response to events.
A user changes the current value.
A user selects the input field.
A user deselects the input field.
Methods
Methods for interacting with Editable Text. You can write JavaScript almost anywhere in Retool and use methods to manipulate data or components.
Set the current value.
Clear the current value.
Scrolls the canvas or parent container so that the selected component appears in the visible area.
Validates the value of the input field.
Clear the validation message from the input field.
Set the hidden
value to toggle whether the component is visible. Defaults to true
without a parameter.
Reset value
to the default value.
Set focus on the input field.
Removes focus on the input field.