Quickly go from a paper court form to a runnable, guided, step-by-step web application powered by Docassemble. Swap out branding and pre-built questions to meet your needs.
Currently, when you use the al_nav_sections method to declaratively define navigation, you need the longer and more verbose data from code because the hidden dictionary key is evaluated as a str.
For example:
---
reconsider: True
variable name: al_nav_sections
data from code:
- section_intro: |
"Introduction"
- section_about_you: |
"About you"
- section_about_spouse: |
"About your spouse"
hidden: not is_married
works but
reconsider: True
variable name: al_nav_sections
variable name: al_nav_sections
data:
- section_intro: Introduction
- section_about_you: About you
- section_about_spouse: About your spouse
hidden: ${ not showifdef("is_married") }
does not.
Type coercion is safe here because structurally, hidden is only meant to ever be a boolean value. it's only acted on when the value is exactly True.
Currently, when you use the
al_nav_sections
method to declaratively define navigation, you need the longer and more verbosedata from code
because thehidden
dictionary key is evaluated as astr
.For example:
works but
does not.
Type coercion is safe here because structurally,
hidden
is only meant to ever be a boolean value. it's only acted on when the value is exactlyTrue
.