# Example

### Name and date

First, we create a step for our name&#x20;

![](/files/-LoPJrvpr5D1RBOeBEda)

Next, we have to drag a 'free text' field from the sidebar to this step

![](/files/-LoPK-_Q0_hM76fydXyr)

Now we drag a date field to the same step

![](/files/-LoVg4__TfbixU1K_SeV)

Add the following text \
`The date today is {{Name.answer}}`

### Options

Now we have to create a step that's going to ask us to pick a value from a list of options

![](/files/-LoPKLdaNrwEZmqpBEhO)

Next, we drag an option group from the sidebar to this step with the options

![](/files/-LoPKRwC2S9RhWu1tcaO)

### Choice

Next, in case someone picks the second option, we want to know why, so we add the following field to the same step

![](/files/-LoPNeCW-zp_-rpQR1hy)

`{{#Example.Options.indexOf("first") > -1}}I don't like that option, {{Name.yourname}}{{/}}{{#Example.Options.indexOf("second") > -1}}That's a good option!{{/}}{{#Example.Options.indexOf("third") > -1}}{{/}}`

### Calculation

We can also a calculation inside the form, and have form calculate something based on the given answers.\
First we create a calculation step with three number fields.\
We call them `Calc.fav` `Calc.house` and `Calc.multiply`

![](/files/-LoLS7H7llDp8vquOqGj)

Now, we drag an expression to this step and have it multiply the sum of your favorite number with your address by a number of choice, which we call Calc.total

![](/files/-LoPLWwTNJWUb30gwiXL)

Under article 3, we added the following code

`Your total is ({{Calc.fav}} + {{Calc.house}}) * {{Calc.multiply}} = {{Calc.total}}`

Since we defined the articles, and we added 'scroll to article 3' in all steps, we will be shown this part of the text when someone has to answer the questions.&#x20;

### Lets add in a variable article

We're going to create a table of contents with one variable article we want to be able to take out. First we're going to create a step with a choice field.&#x20;

![](/files/-LoVY1pVHg0MHzyRr0Dj)

We want article 4 to show, unless someone answers 'no', and when it doesn't show, we want the other article numbers to automatically update, so we write the following text:`Table of contents`\
`Article {{$[1]}} Beginning`\
`Article {{$[2]}} Middle`\
`Article {{$[3]}} Example`\
`{{#article.answer !== "no"}}Article {{$[4]}} Article Example{{/}}`\
`Article {{$[5]}} Final`\
and we write write article 4 in the same way:

<div align="left"><img src="/files/-LoVYgzsu9yiq7tWwY4w" alt=""></div>

### A final check to see if we understand everything!

![](/files/-LoPa01hq0q8ylDqDuXs)

![](/files/-LoPa57HXHXY9Oit9ESJ)

If someone answers no, we want to know how bad they understand it. We will use the Likert scale for that.

![](/files/-LoPaNflqzH92HER4R-c)

We add the following text:`{{#understand.question == 1}}That's great!{{/}}`

`{{#understand.scale == "neutral" || understand.scale == "decent" || understand.scale == "good"}}You'll get there if you keep practicing!{{/}}`

`{{#understand.scale == "not at all" || understand.scale == "not good enough"}}Try reading the documentation again, follow along, and try again! :){{/}}`

We now have the following text

![](/files/-LoZn_Q8k1IvrrP7zRSZ)

### Lets see how our template works!

![Date is working, no name yet](/files/-LoViAyf0uWhYywjRq0i)

![Lets try the second one](/files/-LoVibQO94wlcXS9IQDN)

![Good!](/files/-LoViIMtDXCrXLWeCGK1)

![](/files/-LoViWDd738Ydr-mzweD)

![Article 4 gets removed and 5 turns to 4](/files/-LoVim1N6OpuAlzlbyXo)

![Read again!](/files/-LoViw3XlvAmebtFa2b7)

![We'll get there!](/files/-LoVj0EeExYjl4bj7haK)

![Done!](/files/-LoVj7ENIZnK1pPtNz1H)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fillthedoc.com/templates/example.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
