Permalink
Fetching contributors…
Cannot retrieve contributors at this time
99 lines (96 sloc) 1.73 KB
metadata:
title: Navigation with code
short title: Navigation
documentation: "https://docassemble.org/docs/functions.html#DANav.set_section"
example start: 1
example end: 12
---
sections:
- intro: Introduction
- about: About you
subsections:
- contact: Contact info
- demographic: Demographics
- prefs: Preferences
- conclusion: Conclusion
---
features:
navigation: True
---
mandatory: True
code: |
sees_nav_bar
nav.set_section('about')
intro_to_about_you
nav.set_section('contact')
first_name
email_address
nav.set_section('demographic')
gender
belly_button
nav.set_section('prefs')
favorite_fruit
favorite_vegetable
nav.set_section('conclusion')
final_screen
---
question: |
Welcome to the interview
subquestion: |
If you are not on a
smartphone-sized device,
you should see a navigation
bar to the left.
field: sees_nav_bar
---
question: |
I am going to ask you some
questions about yourself.
field: intro_to_about_you
---
question: |
What is your name?
fields:
- First Name: first_name
- Last Name: last_name
---
question: |
What is your e-mail address?
fields:
- E-mail: email_address
datatype: email
---
question: |
What is your gender?
field: gender
choices:
- Male
- Female
- Something else
---
question: |
What kind of belly button
do you have?
field: belly_button
choices:
- Innie
- Outie
---
question: |
What is your favorite fruit?
fields:
- Favorite fruit: favorite_fruit
---
question: |
What is your favorite vegetable?
fields:
- Favorite vegetable: favorite_vegetable
---
event: final_screen
question: Thank you.
subquestion: |
${ first_name },
Your answers mean a lot to me.
I am going to go eat some
${ favorite_vegetable }
now.