-
Notifications
You must be signed in to change notification settings - Fork 252
/
dispatch.yml
77 lines (77 loc) · 1.3 KB
/
dispatch.yml
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
metadata:
title: Dispatch
documentation: "https://docassemble.org/docs/functions.html#dispatch"
example start: 1
example end: 13
---
mandatory: True
code: |
dispatch('main_menu_selection')
final_screen
---
question: |
Main menu
field: main_menu_selection
buttons:
- Fruit: fruit_menu
- Vegetables: vegetable_menu
- Rocks: rocks_page
- Continue: Null
---
code: |
fruit_menu = dispatch('fruit_menu_selection')
---
question: |
Fruit menu
field: fruit_menu_selection
choices:
- Apple: apple
- Peach: peach
- Back: Null
---
code: |
vegetable_menu = dispatch('vegetable_menu_selection')
---
question: |
Vegetable menu
field: vegetable_menu_selection
choices:
- Turnip: turnip
- Potato: potato
- Back: Null
---
question: Rocks screen
field: rocks_page
---
question: Apples screen
subquestion: |
% if likes_apples:
You like apples.
% endif
field: apple
---
question: |
Do you like apples?
yesno: likes_apples
---
question: Peaches screen
subquestion: |
You selected
${ main_menu_selection }
on the main menu and
${ fruit_menu_selection }
on the fruit menu.
field: peach
---
event: turnip
question: Turnip screen
subquestion: |
You cannot go forward from
the turnip screen.
---
question: Potato screen
field: potato
---
event: final_screen
question: |
Done with the interview.