-
Notifications
You must be signed in to change notification settings - Fork 300
Expand file tree
/
Copy pathfields-checkboxes.yml
More file actions
40 lines (37 loc) · 908 Bytes
/
fields-checkboxes.yml
File metadata and controls
40 lines (37 loc) · 908 Bytes
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
metadata:
title: Checkboxes within fields
short title: Checkboxes
documentation: "https://docassemble.org/docs/fields.html#fields checkboxes"
example start: 1
example end: 2
---
question: |
Please tell me what you think.
fields:
- "Select the fruits you like": likes_fruit
datatype: checkboxes
choices:
- apple
- peach
- pear
- "What is your favorite fruit overall?": favorite_fruit
---
question: |
Thank you for your thoughts.
subquestion: |
% if likes_fruit['apple']:
You like apples.
% endif
% if likes_fruit['peach']:
You like peaches.
% endif
% if likes_fruit['pear']:
You like pears.
% endif
Your favorite, though, is ${ favorite_fruit }.
In other words, you like
${ likes_fruit.true_values() }.
Your favorite, though, is ${ favorite_fruit }.
In Python, `likes_fruit` is a `DADict`:
`${ repr(likes_fruit) }`.
mandatory: True