The Checkbox component for Retool Mobile
An input field to toggle a boolean value.
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.
caption
The additional text to display with the label.
Type | string | ||||
Format | Plain Text | ||||
Mutability |
|
disabled
Whether input, interaction, selection, or triggering is disabled.
Type | boolean | ||||||
Format | True/False | ||||||
Mutability |
| ||||||
Default |
|
Examples
true
hidden
Whether this object is hidden from view.
Type | boolean | ||||||
Format | True/False | ||||||
Mutability |
| ||||||
Default |
|
Examples
true
label
The text label to display.
Type | string | ||||
Format | Plain Text | ||||
Mutability |
| ||||
Default |
|
Examples
"Label"
value
The current value or the default value.
Type | boolean | ||||||
Format | True/False | ||||||
Mutability |
| ||||||
Default |
|
Examples
true
width
The width.
Type | string | ||||||
Format | Integer | ||||||
Mutability |
| ||||||
Allowed Values |
|
Examples
1280
Methods
JavaScript API methods for this object. You can write JavaScript almost anywhere in Retool and use methods to manipulate data and property values.
checkbox.clearValidation()
Examples
Clear the validation message from checkbox
.
checkbox.clearValidation();
checkbox.clearValue()
Examples
Clear the current value of checkbox
.
checkbox.clearValue();
checkbox.focus()
Examples
Set focus on checkbox
.
checkbox.focus();
checkbox.resetValue()
Examples
Reset the current value of checkbox
.
checkbox.resetValue();
checkbox.setDisabled()
Set the disabled
value to toggle whether the input field is disabled. Defaults to true
without a parameter.
checkbox.setDisabled(disabled)
Parameters
disabled
Whether input, interaction, selection, or triggering is disabled.
Type | boolean |
Format | True/False |
Default |
|
Examples
true
Examples
Disable checkbox
.
checkbox.setDisabled(true);
Enable checkbox
.
checkbox.setDisabled(false);
checkbox.setHidden()
Set the hidden
value to toggle whether the component is visible. Defaults to true
without a parameter.
checkbox.setHidden(hidden)
Parameters
Examples
true
Examples
Hide checkbox
.
checkbox.setHidden(true);
Unhide checkbox
.
checkbox.setHidden(false);
checkbox.setValue(value)
Examples
Set the current value of checkbox
to userValue
.
checkbox.setValue(userValue);
checkbox.toggle()
Examples
Toggle the current value of checkbox
.
checkbox.toggle();
checkbox.validate()
Examples
Validate the value of checkbox
.
checkbox.validate();
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 |
---|---|
Change | The value is changed. |
False | The value is set to false . |
True | The value is set to true . |