docs: 📝 Add "Set variable" doc
This commit is contained in:
4
apps/docs/docs/editor/blocks/_category_.json
Normal file
4
apps/docs/docs/editor/blocks/_category_.json
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"label": "Blocks",
|
||||||
|
"position": 1
|
||||||
|
}
|
29
apps/docs/docs/editor/blocks/set-variable.md
Normal file
29
apps/docs/docs/editor/blocks/set-variable.md
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
# Set variable
|
||||||
|
|
||||||
|
The "Set variable" block allows you to set a particular value to a variable.
|
||||||
|
|
||||||
|
<img src="/img/blocks/set-variable.png" width="600" alt="Set variable"/>
|
||||||
|
|
||||||
|
This value can be any kind of plain text but also **Javascript code**.
|
||||||
|
|
||||||
|
It means you can apply operations on existing variables:
|
||||||
|
|
||||||
|
```
|
||||||
|
{{Score}} + 5
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
{{Score}} * {{Multiplier}}
|
||||||
|
```
|
||||||
|
|
||||||
|
But also set the variable to the current date for example:
|
||||||
|
|
||||||
|
```
|
||||||
|
new Date()
|
||||||
|
```
|
||||||
|
|
||||||
|
Or a random ID:
|
||||||
|
|
||||||
|
```
|
||||||
|
Math.round(Math.random() * 1000000)
|
||||||
|
```
|
@ -4,6 +4,6 @@ sidebar_position: 2
|
|||||||
|
|
||||||
# Overview
|
# Overview
|
||||||
|
|
||||||
The best way for me to show you Typebot's simplicity is through a product tour video:
|
The best way to understand the basic principles of Typebot is by watching the "Get started" video series:
|
||||||
|
|
||||||
<iframe width="900" height="500" src="https://www.youtube.com/embed/u8FZHvlYviw" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
<iframe width="900" height="500" src="https://www.youtube.com/embed/videoseries?list=PLHpyDlgo4x7NUjF-L5VaYfBPQ03uzf5l3" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
||||||
|
@ -5,10 +5,10 @@ slug: /
|
|||||||
|
|
||||||
# Welcome
|
# Welcome
|
||||||
|
|
||||||
[Typebot](https://www.typebot.io) is a conversational form builder that helps you collect more responses compared to other form builders (Typeform, Google Forms, Tally...).
|
[Typebot](https://www.typebot.io) Typebot is an open-source alternative to Landbot. It allows you to create conversational apps/forms (Lead qualification, Product launch, User onboarding, Customer support), embed them anywhere on your web/mobile apps, and collect results in real-time.
|
||||||
|
|
||||||
This is the Typebot documentation. It's a great place to find most answers. Please use the search box in the top right or the navigation menu (soon available) on the left-hand side to find the answers you're looking for.
|
This is the Typebot documentation. It's a great place to find most answers. Please use the search box in the top right or the navigation menu (soon available) on the left-hand side to find the answers you're looking for.
|
||||||
|
|
||||||
This documentation is a work in progress.
|
This documentation is a work in progress.
|
||||||
|
|
||||||
If you can't find what you're looking for, don't hesitate to contact me directly on the web app or at baptiste@typebot.io.
|
If you can't find what you're looking for, don't hesitate to contact me directly on the web app or at support@typebot.io.
|
||||||
|
@ -17,7 +17,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
href: 'https://github.com/typebot-io/docs',
|
href: 'https://github.com/baptisteArno/typebot.io/tree/main/apps/docs',
|
||||||
label: 'Contribute',
|
label: 'Contribute',
|
||||||
position: 'right',
|
position: 'right',
|
||||||
},
|
},
|
||||||
@ -41,10 +41,6 @@ module.exports = {
|
|||||||
label: 'Roadmap',
|
label: 'Roadmap',
|
||||||
to: 'https://app.typebot.io/feedback',
|
to: 'https://app.typebot.io/feedback',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: 'Blog',
|
|
||||||
to: 'https://www.typebot.io/blog',
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -63,10 +59,6 @@ module.exports = {
|
|||||||
{
|
{
|
||||||
title: 'Company',
|
title: 'Company',
|
||||||
items: [
|
items: [
|
||||||
{
|
|
||||||
label: 'About',
|
|
||||||
to: 'https://www.typebot.io/about',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: 'Terms of Service',
|
label: 'Terms of Service',
|
||||||
href: 'https://www.typebot.io/terms-of-service',
|
href: 'https://www.typebot.io/terms-of-service',
|
||||||
|
BIN
apps/docs/static/img/blocks/set-variable.png
vendored
Normal file
BIN
apps/docs/static/img/blocks/set-variable.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 265 KiB |
Reference in New Issue
Block a user