Permalink
Fetching contributors…
Cannot retrieve contributors at this time
27 lines (25 sloc) 531 Bytes
metadata:
title: Whether variable is defined
documentation: "https://docassemble.org/docs/functions.html#defined"
example start: 2
---
modules:
- docassemble.base.util
---
question: Summary
subquestion: |
Your favorite fruit is
${ favorite_fruit }.
% if defined('favorite_vegetable'):
Your favorite vegetable
is ${ favorite_vegetable }.
% else:
I do not know your favorite
vegetable.
% endif
mandatory: True
---
question: |
Tell me about your favorite fruit.
fields:
- Favorite fruit: favorite_fruit