The Image Input component for Retool Mobile
An input field to select images or take a photo with the camera.
Captured images are temporarily stored on the device for native apps and in the Retool organization for web apps.
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.
disabled
Whether input, interaction, selection, or triggering is disabled.
Type | boolean | ||||||
Format | True/False | ||||||
Mutability |
| ||||||
Default |
|
Examples
true
Array Object Properties
Examples
1617024000000
hidden
Whether this object is hidden from view.
Type | boolean | ||||||
Format | True/False | ||||||
Mutability |
| ||||||
Default |
|
Examples
true
isPublic
Whether to make the file public when uploading with Retool Storage.
Type | boolean | ||||
Mutability |
|
label
The text label to display.
Type | string | ||||
Format | Plain Text | ||||
Mutability |
| ||||
Default |
|
Examples
"Label"
launchMode
The input method to use.
Type | string | ||||||||
Mutability |
| ||||||||
Allowed Values |
|
placeholder
The text to display within the input field when there is no value.
Type | string | ||||
Format | string | ||||
Mutability |
| ||||
Default |
|
Examples
Enter a value
resolution
Whether to resize images to a different resolution.
Type | string | ||||||||||
Mutability |
| ||||||||||
Allowed Values |
|
selectionType
The type of file selection.
Type | string | ||||||||
Mutability |
| ||||||||
Allowed Values |
|
shouldCompress
Whether to compress images. If enabled, file size is reduced by 50% with minimal reduction in quality.
Type | boolean | ||||
Mutability |
|
shouldOverwriteOnNameCollision
Whether to replace a file with the same name when uploading with Retool Storage.
Type | boolean | ||||
Mutability |
|
uploadToRetoolStorage
Whether to upload a file to Retool Storage.
Type | boolean | ||||
Mutability |
|
Methods
JavaScript API methods for this object. You can write JavaScript almost anywhere in Retool and use methods to manipulate data and property values.
imageInput.clearValue()
Clear the current values.
imageInput.clearValue()
Examples
Clear the current value of imageInput
.
imageInput.clearValue();
imageInput.close()
Close the component.
imageInput.close()
Examples
Close imageInput
.
imageInput.close();
imageInput.open()
Open the component.
imageInput.open()
Examples
Open imageInput
.
imageInput.open();
imageInput.resetValue()
Reset the current value to the default value.
imageInput.resetValue()
Examples
Reset the current value of imageInput
.
imageInput.resetValue();
imageInput.setDisabled()
Set the disabled
value to toggle whether the input field is disabled. Defaults to true
without a parameter.
imageInput.setDisabled(disabled)
Parameters
disabled
Whether input, interaction, selection, or triggering is disabled.
Type | boolean |
Format | True/False |
Default |
|
Examples
true
Examples
Disable imageInput
.
imageInput.setDisabled(true);
Enable imageInput
.
imageInput.setDisabled(false);
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 |
---|---|
Capture | A value is captured. |
Close | The component or item is closed. |
Open | The component or item is opened. |