Skip to content
Permalink
 
 
Cannot retrieve contributors at this time
48 lines (48 sloc) 1.06 KB
metadata:
title: Redo multiple choice
short title: Redo
documentation: "https://docassemble.org/docs/functions.html#forget_result_of"
example start: 2
example end: 4
---
question: |
I give up. Just tell me your favorite food.
fields:
Favorite food: favorite_food
---
id: favorite_food stage 2
question: |
Ok, are any of these your favorite food?
choices:
- Strawberries:
code: |
favorite_food = 'strawberries'
- Grapes:
code: |
favorite_food = 'grapes'
- Kiwi:
code: |
favorite_food = 'kiwi'
- Something else: continue
---
id: favorite_food stage 1
question: |
What is your favorite food?
choices:
- Apples:
code: |
favorite_food = 'apples'
- Oranges:
code: |
favorite_food = 'oranges'
- Something else: continue
---
event: reset_favorite_food
code: |
del favorite_food
forget_result_of("favorite_food stage 1", "favorite_food stage 2")
---
question: Your favorite food is ${ favorite_food }.
subquestion: |
[Ask it again](${ url_action('reset_favorite_food')})
mandatory: True
You can’t perform that action at this time.