> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flowforma.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Document display rules

> Use document display rules to conditionally show or hide flow attributes in a generated document based on values captured in your FlowForma flow.

The FlowForma document generator lets you dynamically display information in a document template by using rules. These rules are based on the flow's attributes: if the conditions are met, the selected attribute is displayed in the generated document. By default, attributes inserted in a document are displayed in the generated document.

## Create/edit a rule

To create a rule, open the document template and select the **Rules** tab from the panel. If the document contains rules, they're displayed in this section, as shown below. Click a rule to open the rule editor panel.

To create a new rule, select the attribute you want to display and then click **Add rule**. In the rule editor panel, enter a name for the rule and then set the required conditions.

* In the first section of the condition, select the flow attribute from the drop-down list.
* In the second section, select a condition from the drop-down list: is blank, not blank, equal, does not equal, contains, does not contain, greater than, or less than.
* In the third section, enter the value for the condition.

By default you have one row for conditions. You can add more by clicking **Add**. When you have more than one condition, the editor shows another section where you can select "and" or "or". These options let you define whether just one or all of the conditions have to be met for the rule to be executed.

<img src="https://mintcdn.com/flowforma/v8UMuZxCjEz54jQV/images/product/document-generator/document-display-rules/document-display-rules-1.png?fit=max&auto=format&n=v8UMuZxCjEz54jQV&q=85&s=14fdc929ba135c7c466d4a5da2fb004c" alt="The rules tab in the panel" width="1133" height="615" data-path="images/product/document-generator/document-display-rules/document-display-rules-1.png" />

<img src="https://mintcdn.com/flowforma/v8UMuZxCjEz54jQV/images/product/document-generator/document-display-rules/document-display-rules-2.png?fit=max&auto=format&n=v8UMuZxCjEz54jQV&q=85&s=1e29fb701e569f43587b3ee9f89af2b3" alt="The rule editor panel" width="737" height="559" data-path="images/product/document-generator/document-display-rules/document-display-rules-2.png" />

Once you've finished editing the rule, click **OK**. The rule is saved and displayed in the rules list.

When you click an attribute, any rules applied to it are displayed in a container showing the rule number.

<img src="https://mintcdn.com/flowforma/v8UMuZxCjEz54jQV/images/product/document-generator/document-display-rules/document-display-rules-3.png?fit=max&auto=format&n=v8UMuZxCjEz54jQV&q=85&s=642b7e3aab1a16a1834a70a867deecc7" alt="Rules applied to an attribute, shown with the rule number" width="680" height="194" data-path="images/product/document-generator/document-display-rules/document-display-rules-3.png" />
