Form inputs
Example
[ask.name]
description = Please enter you name:
; Taking form input
; Forms support markdown in descriptions. Labels could use any of the supported `display_option`
[ask.user_info]
input_data_type = form
description = ### Please fill this form:
form_data =
[
{
"name": "alias",
"field_type": "textarea",
"input_type": "str",
"description": "Enter the alias that you would like to use",
"type_params": {
"maxlength": 30,
"placeholder": "{{input.name}}"
}
},
{
"name": "age",
"field_type": "number",
"input_type": "int",
"description": "{{input.name}}, you need to enter your age now! 🤯",
"type_params": {
"min": 0,
"max": 120,
"step": 1
}
},
{
"name": "temperature",
"field_type": "number",
"input_type": "float",
"description": "Enter the temperature",
"type_params": {
"min": -273.15,
"max": 500.0,
"step": 0.1
}
},
{
"name": "is_adult",
"field_type": "checkbox",
"input_type": "bool",
"description": "Are you an adult?",
"type_params": {
"options": {
"label": "Yes",
"value": "{{input.name}}",
"display_option": "text"
}
}
},
{
"name": "favourite_color",
"field_type": "select",
"input_type": "str",
"description": "Select your favourite colour",
"type_params": {
"options": [
{
"label": "Red",
"value": "Red",
"display_option": "text"
},
{
"label": "Blue",
"value": "Blue",
"display_option": "text"
}
]
}
}
]Last updated
Was this helpful?