Permalink
Fetching contributors…
Cannot retrieve contributors at this time
52 lines (50 sloc) 1.09 KB
metadata:
title: Fill fields with variables
short title: Fill
documentation: "https://docassemble.org/docs/documents.html#template code"
example start: 8
example end: 8
---
modules:
- docassemble.base.util
---
question: |
Assembling a document from a PDF
template
subquestion: |
This interview will fill fields in
a .pdf template. You can
[download the template] to see what
it looks like.
[download the template]: ${ url_of('fruit_template.pdf') }
field: introduction_shown
---
question: What is your favorite fruit?
fields:
Favorite fruit: favorite_fruit
---
question: What is your favorite vegetable?
fields:
Favorite vegetable: favorite_veggie
---
question: What is your favorite legume?
fields:
Favorite legume: favorite_legume
---
question: What is your favorite fungus?
fields:
Favorite fungus: favorite_fungus
---
mandatory: True
code: |
introduction_shown
---
mandatory: True
question: Here is your document.
attachment:
pdf template file: fruit_template.pdf
field variables:
- favorite_fruit
- favorite_veggie
- favorite_legume
- favorite_fungus