Prompt number
- 18 May 2022
- 1 Minute to read
-
DarkLight
-
PDF
Prompt number
- Updated on 18 May 2022
- 1 Minute to read
-
DarkLight
-
PDF
Get number input from the user with a blocking dialog.
The dialog has a number input field and two buttons: confirm on the right and cancel on the left.
Pressing the confirm button will trigger the first output with the entered number.
Pressing the cancel button will trigger the second output.
If an error occurs, the third output is triggered.
Input arguments
Label | Key | Type | Required? | Default | Description |
---|---|---|---|---|---|
Dialog title | title |
Json | Yes | – | Title text to show on the prompt dialog. |
Dialog message | message |
Json | No | – | Message text to show under the title. |
Initial value | initialValue |
Number | No | – | Initial value to show in the input field. |
Placeholder text | placeholder |
String | No | – | Placeholder text to show in the input field when the user has not inputted any text. |
Keyboard type | keyboardType |
String | No | number-pad | Keyboard type for the input. |
Confirm button label | confirmLabel |
String | No | OK | Text label on the confirm button. |
Cancel button label | cancelLabel |
String | No | Cancel | Text label on the cancel button |
Output arguments
Number of outputs: 3
Label | Key | Type | Description |
---|---|---|---|
Inputted number | userInput |
Number | Number inputted by the user. |
Events
No events.
Errors
Label | Code | Description |
---|---|---|
Unknown error | unknown |
Thrown if an unknown error occurred while showing the number prompt. |
Was this article helpful?