Permalink
Fetching contributors…
Cannot retrieve contributors at this time
53 lines (50 sloc) 1.08 KB
metadata:
title: Tables in a DOCX template
short title: Tables
documentation: "https://docassemble.org/docs/documents.html#docx tables"
example start: 3
example end: 7
---
modules:
- docassemble.base.util
---
question: |
Assembling a document from a .docx
template
subquestion: |
This interview will fill fields in
a .docx template. You can
[download the template] to see what
it looks like.
The letter will be sent by the
user to an adverse party to
complain about something.
[download the template]: ${ url_of('table_template.docx') }
field: introduction_shown
---
objects:
seeds_of_fruit: DADict
---
mandatory: true
code: |
seeds_of_fruit.there_are_any = True
introduction_shown
---
question: |
Tell me about a fruit.
fields:
- Name: seeds_of_fruit.new_item_name
- Seeds: seeds_of_fruit.new_item_value
datatype: integer
min: 0
---
question: |
Are there any other fruits you would
like to describe?
yesno: seeds_of_fruit.there_is_another
---
mandatory: True
question: |
Here is your document.
attachment:
docx template file: table_template.docx