Form
The form code block enables you:
- to describe a form
- prompt a modal
- and use the result in your template
You need to enable pochoir-form code block in plugin settings.
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-formcode block with theexportsattribute exposing form results to the variablemyForm - a text field
titleand a textarea fielddesc - and two variables
myForm.titleandmyForm.descriptionused in our template
Learn more about form attributes and form fields.