How to use the text input question type
The Text input question type allows the user to enter a text in response to the question asked.
1. Edit a text input question
Once you have added the "Text input" question type to your flow, you will have the following options:
- Type: Allows you to easily change the type of question.
- Category: Allows you to give the question a certain category.
- Question: The actual question you want to ask your users.
- Text: Extra text for the question. This can be useful to explain various things.
- Show in product matches list: when enabled, it shows the selected answer of the user on the result page as a match label.
- Default value: A default value for the text input.
2. Use the input of a user to personalize your flow
To use the text input of a user in our flow, we first have to store the input. We can do this with 'variables'. Enable ‘variables’ so you can store the user's input (dog's name) and use it in your flow.
When you now select the answer within the text input question (in configuration tab), you will see a tab with ‘variables’.
You can then add a variable by clicking on 'add variable'. Give your variable a name (e.g. the key). In our example we use 'name_dog'. You can then add a value for your key. Since we want to store the input of the user, we check the checkbox 'use input' as a value.
You can then use this variable (e.g. 'name_dog') in your flow to dynamically show the value. For example, use it in follow-up questions to personalize your flow.
To use variables in your flow, please use the syntax '{vars.[KEY]}' where '[KEY]' refers to the name of your variable. In the example above the correct syntax is '{vars.name_dog}'
Documentation