leonardojacomussi
TTypebot
•Created by greenrhyno on 8/3/2024 in #help-and-questions
load a variable with an array/list via query string
4 replies
TTypebot
•Created by leonardojacomussi on 8/3/2024 in #help-and-questions
Is there any way to collect a user variable via text input without blocking the flow?
Ohh, interesting!
Thanks for the feedback @Baptiste
5 replies
TTypebot
•Created by greenrhyno on 8/3/2024 in #help-and-questions
load a variable with an array/list via query string
There is more than one way to handle arrays in URL parameters, here is an example of how I handle it 👇🏼
In the URL: https://your_viewer_domain/your_bot_name?my_array=a,b,c
The "a,b,c" part is read as a string, so when setting the variable I transform it into an array in two steps:
1. I instantiate the variable
2. I check the type of the variable and then transform it into an array with the javascript split method.
Test the flow I attached, maybe it will clarify a bit.
4 replies