Conditional sections in Notepad templates allow you to selectively include content in a generated document based on the value of a string template input.
Add a conditional section
You can add a conditional section to a Notepad template by clicking + Add Widget or typing / in a paragraph field to open the widget insertion menu, then choosing the Conditional Section option under Generator.
First, select a string template input. You will be able to configure a rule based on the value of this template input.
After selecting a string template input, you can configure a rule. The "If" section lets you set the condition of the rule, and the "then" section lets you set the consequence.
For example, if the doesPlaneNeedMaintenance template input equals YES, the contents of the conditional section will be displayed.
When a document is generated from a template, the rule configured by the user determines whether the conditional section's contents will be included in the generated document.
You can add a preview value to the selected template input to preview the behavior of the conditional section during template generation. The conditional section will have a green border if the contents will be displayed during template generation, and a red border if the contents will not be displayed.
Template configuration
Configure template input: Lets users pick a template input. The contents of the conditional section will be displayed if this template input satisfies the configured rule.
Configure rule: Lets users configure the rule that determines whether the contents of the conditional section will be displayed.