display_input_modal
- 1 Minute to read
display_input_modal
- 1 Minute to read
Article summary
Did you find this summary helpful?
Thank you for your feedback
display_input_modal()
This function displays an input modal component.
The input modal component provides a dialog screen asking from the user to enter some information. The component can be used for example to ask the user ‘what is the robot name?’
Reference
Explore more about this component here
Arguments
Arguments | Type | Default Value | |
---|---|---|---|
input_type | enum | INPUT_TYPE.TEXT | enum to define the type of the input allowed: TEXT or NUMERIC |
title | string | title of the modal (mandatory) | |
subtitle | string | subtitle of the modal (optional) | |
placeholder | string | text that will appeat in the input field before the user enter some data | |
cancel_text | string | "No" | cancel text button |
submit_text | string | "Yes" | submit text button |
theme | enum | THEME_TYPE.DARK | enum to define the theme of the screen. Can be DARK or WHITE |
Return
Dictionary that contains the action performed by the user and the value he entered.
The action can be: canceled/confirmed/closed.
Example
response = await self.UI.display_input_modal(title="How many boxes?")
self.log.info.print(response)
>>>[{"action": "confirmed", "value": "4"}]
Was this article helpful?