2
0

📝 Improve prefilled variables clarity

This commit is contained in:
Baptiste Arnaud
2022-12-08 14:28:40 +01:00
parent 7eac2c7110
commit 141ffd35f7
2 changed files with 19 additions and 10 deletions

View File

@ -128,12 +128,12 @@ You can add hidden variable values in your embed code by adding the `hiddenVaria
Typebot.initContainer('typebot-container', {
url: 'https://viewer.typebot.io/my-typebot',
hiddenVariables: {
'Current URL': window.location.href,
'Current URL': 'https://my-site/account',
'User name': 'John Doe',
},
})
```
It will populate the `Current URL` variable with the parent URL and the `User name` variable with "John Doe".
It will prefill the `Current URL` variable with "https://my-site/account" and the `User name` variable with "John Doe". More info about variables: [here](/editor/variables).
Note that if your site URL contains query params (i.e. https://typebot.io?name=John), the variables will automatically be injected to the typebot. So you don't need to manually transfer query params to the bot embed configuration.
Note that if your site URL contains query params (i.e. https://typebot.io?User%20name=John%20Doe), the variables will automatically be injected to the typebot. So you don't need to manually transfer query params to the bot embed configuration.