imageChooser
Description
Selects an image from user's phone storage.
Input / Parameter
Name | Description | Input Type | Default | Options | Required |
---|---|---|---|---|---|
multiple | The image(s) to choose. | Array/List | - | - | Yes |
Output
N/A
Callback
callback
The setComponentValue function will be executed to show the image chosen in the image component if it exists.
errorCallback
The function to be executed if the image component does not exist.
Video
Coming Soon.
Example
The user wants to display an image from their gallery/phone storage.
Step
Drag an image, label and button component. Rename the label component to 'Result' and the button component to 'Image Chooser'.
Call the function
imageChooser
in the button. Call the functionconsole
in the callbacks of theimageChooser
function. Select the parameter typeinput
for thevalue
parameter.In the callbacks, call the function
setComponentValue
. For the success callback, select the image component in thecomponent
parameter. For the error callback, select the label component in thecomponent
parameter. Set thevalue
parameter type toinput
.
Result
The image chosen will be displayed in the image component if it exists. If image does not exist, the label component will show the error.
Links
Last updated