Submit an input with JS ?
Currently it exists a method to fill an input : setInputValue() (https://docs.typebot.io/deploy/web/html-javascript#additional-configuration).
But, it seems there is no way to submit this same input, using JS code too ?
Because il's nice to have the capability to auto-fill an input, but at the end if the user as to click on the submit button, we lose the profit of it.
Thank you for your answers.
Typebot Docs
HTML & Javascript - Typebot Docs
6 Replies
That's a good idea đ
Here is the full "picture" of my use case :
1/ Typebot show an input to the user, and the user fill it
2/ Typebot trigger an IA agent
3/ IA agent answer with a structured output, which contains 3 keys : message, rich data (as an array), follow-ups (as an array)
- Message is shown by Typebot as is
- Rich data is shown thanks to an iframe
- Follow-ups are shown as chips for the user, giving him "fast-prompts" idea for his next interaction with the chatbot
4/ Loop back to the first step
And so, when the user click on a chips, I can fill the Typebot input, but I can't submit it. This is not really great for the user which have to click 2 times (chips + submit button).
On it now
Done, releasing embed lib v0.9.0, that contains a new
submitInput command. Should be available in 10 minSuper great Baptiste , thank you !
I just made a test, by getting the v0.9.0 lib, and for now it failed on my side.
What I do :
Typebot.setInputValue(value);
Typebot.submitInput();
I have the submitInput is not a function error.Oh yes my bad!!
Will release 0.9.1 ASAP, should fix it
Nice ! I confirm that 0.9.1 fixed it !
â¤ď¸