# Conditional section :::callout{theme="neutral"} This widget is only available for [document templates](../templates-overview/index.md). ::: **Conditional sections** in Notepad templates allow you to selectively include content in a generated document based on the value of a string template input. ![Example of a conditional section in a Notepad template.](../../../assets/490041e0a0ec31a62f4b75a0548f52c7538da34be01201a3cfb31f6858f20281.webp) ## 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](../embed-widgets/index.md#from-a-document), 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. !["Widget properties" panel for conditional section with no template input selected under "Configure template"](../../../assets/084933f9d610b0cae837ff826f2cafa73ec5dcd6225b6a32dc9aeaade3cb56f9.webp) 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. ![Widget properties panel where "Configure template input" has doesPlaneNeedMaintenance with value YES, and "Configure rule" has the if/then statement "If doesPlaneNeedMaintenance is equal to YES, then Show"](../../../assets/904d379c315c60a9717fd219a133eda65c10bf4a5eb227c61816acd296a569c9.webp) 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.