Form
The form
code block enables you:
- to describe a form
- prompt a modal
- and use the result in your template
Let's take an example with the code below:
```pochoir-form exports="myForm"
title:
type: text
label: Title
defaultValue: Untitled
desc:
type: textarea
label: Description
```
# {{myForm.title}}
{{myForm.desc}}
In this template, we have:
- a
pochoir-form
code block with theexports
attribute exposing form results to the variablemyForm
- a text field
title
and a textarea fielddesc
- and two variables
myForm.title
andmyForm.description
used in our template
Learn more about form attributes and form fields.