-
Notifications
You must be signed in to change notification settings - Fork 313
Expand file tree
/
Copy pathdocx-jinja2-demo.yml
More file actions
54 lines (52 loc) · 1.09 KB
/
Copy pathdocx-jinja2-demo.yml
File metadata and controls
54 lines (52 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
metadata:
title: Fill fields in a DOCX template
short title: DOCX
documentation: "https://docassemble.org/docs/documents.html#docx template file"
example start: 8
example end: 8
---
include:
- basic-questions.yml
---
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.
This example demonstrates how to
use "for loops" in a .docx
template.
[download the template]: ${ url_of('docx-jinja2-demo.docx') }
field: introduction_shown
---
question: |
Is the sky blue?
yesno: sky_is_blue
---
code: |
fruit_types = ['apples', 'oranges', 'peaches', 'pears']
---
question: |
What fruits do you like?
fields:
- Favorite fruits: favorite_fruit
datatype: checkboxes
code: fruit_types
---
question: |
Your children are ${ client.child }.
field: show_children
---
mandatory: true
code: |
introduction_shown
document_shown
---
event: document_shown
question: |
Here is the document.
attachment:
docx template file: docx-jinja2-demo.docx