-
Notifications
You must be signed in to change notification settings - Fork 304
Expand file tree
/
Copy pathobject-checkboxes-custom.yml
More file actions
44 lines (44 loc) · 940 Bytes
/
object-checkboxes-custom.yml
File metadata and controls
44 lines (44 loc) · 940 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
41
42
43
44
metadata:
title: Set variable to list of objects
short title: Object
documentation: "https://docassemble.org/docs/fields.html#object_checkboxes"
example start: 1
example end: 6
---
modules:
- docassemble.base.legal
---
objects:
protagonist: Individual
antagonist: Individual
---
mandatory: True
code: |
protagonist.name.first = "Harry"
protagonist.name.last = "Potter"
antagonist.name.first = "Tom"
antagonist.name.last = "Riddle"
---
question: Who are the villains, if any?
fields:
no label: villain
datatype: object_checkboxes
choices:
- protagonist
- antagonist
---
objects:
villain: PartyList.using(auto_gather=False)
---
question: |
% if villain.number() == 0:
There are no villains here.
% else:
The ${ villain.as_noun() }
${ villain.does_verb("include") }
${ villain }.
% endif
subquestion: |
The class name of `villain` is
`${ villain.__class__.__name__ }`.
mandatory: True