Permalink
Cannot retrieve contributors at this time
docassemble/docassemble_base/docassemble/base/data/questions/examples/pdf-template-alt-2.yml
Go to file
65 lines (64 sloc)
1.47 KB
metadata: | |
title: Fill fields with field code | |
short title: Fill | |
documentation: "https://docassemble.org/docs/documents.html#template code" | |
example start: 7 | |
example end: 7 | |
--- | |
objects: | |
recipient: Individual | |
--- | |
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('letter.pdf') } | |
field: introduction_shown | |
--- | |
question: | | |
To whom shall the letter be sent? | |
fields: | |
- First Name: recipient.name.first | |
- Last Name: recipient.name.last | |
--- | |
question: | | |
What is the address of ${ recipient }? | |
fields: | |
- Address: recipient.address.address | |
- Unit: recipient.address.unit | |
required: False | |
- City: recipient.address.city | |
- State: recipient.address.state | |
code: | | |
states_list() | |
- Zip: recipient.address.zip | |
required: False | |
--- | |
question: | | |
What is the subject of the letter? | |
field: subject_of_letter | |
choices: | |
- Sales of oranges in Q4 2016 | |
- Pedantry and pedagogy | |
- Tulips, tiptoes, and soil erosion | |
- Breakfast cereals in late antiquity | |
--- | |
mandatory: true | |
code: | | |
introduction_shown | |
subject_of_letter | |
recipient.name.first | |
recipient.address.address | |
--- | |
mandatory: True | |
question: Here is your document. | |
attachment: | |
pdf template file: letter.pdf | |
field code: | |
- letter_date: today() | |
- subject_line: subject_of_letter | |
- recipient_address: recipient.address_block() |