text_input¶
- class virtualitics_sdk.elements.text_input.TextInput(value='', description='', title='', show_title=True, show_description=True, label='', placeholder='')¶
Bases:
InputElement
A Text Input element.
- Parameters:
value (
str
) – The inputted text, defaults to ‘’.title (
str
) – The title of the element, defaults to ‘’.description (
str
) – The element’s description, defaults to ‘’.show_title (
bool
) – whether to show the title on the page when rendered, defaults to True.show_description (
bool
) – whether to show the description to the page when rendered, defaults to True.label (
str
) – The label of the element, defaults to ‘’.placeholder (
str
) – The placeholder of the element, defaults to ‘’.
EXAMPLE:
# Imports from virtualitics_sdk.elements.text_input import TextInput . . . # Example usage class ExampleStep(Step): def run(self, flow_metadata): . . . text_input = TextInput("Initial values can be set", title="Text Input", label="Some Text", description="Of course we also allow _open ended_ text input such as this.", placeholder='Type Something')
The above TextInput will be displayed as:
- get_value()¶
Get the value of an element. If the user has interacted with the value, the default will be updated.
- Return type:
str