Show-if Formlets are conditional formlets which means that you can create rules that when they evaluate true, a published formlet will appear.
You can only use one rule per formlet per tab. Rules are saved at the app level so they can be used immediately, saved for later, or used on multiple forms. If you update an existing rule, it will apply changes to the rule in each instance that it is used in.
Currently, the builder supports AND and OR.
Before We Start...
This tutorial will assume you understand the following concepts:
Let's Get Started!
In this example, the Root Form is named Form 1 and the Formlet is named Formlet.
From the Formlets Tab on the Editor page of the Root form, drag the Show-if Formlet tile to the canvas located under the Dependent Formlet Controls section.
The Show-If Formlet modal will pop-up which will prompt you to either select an existing rule or create a new rule. For this tutorial, we will be creating a new rule. Select the radio button for "Create new rule".
Next, give the rule a name and a brief description. For this example, we want the formlet to show only when the name field is not blank.
The description is not required but it is recommended as a proactive way to stay organized and communicate to others the purpose of the formlet.
Click the "Add rule" button to begin the process of creating a rule. The rule will be based on your app which means only the fields that your app has access to will be available for selection from the field drop-down.
Once you have selected a field from the drop-down, the operator field will appear. The data type of the field will impact which operators are available. The operator selected will impact if additional components are needed for the rule. As shown below, when the operator is set to Equals the rule requires additional information.
However, when the operator is set to Is Not Blank the rule does not require additional information and you can click the "Next" button.
Select the formlet you want to show when the rule is true and click the "Save" button.
Only the published versions of formlets will appear in the drop-down.
After a successful save, you will see a formlet container appear on the canvas where you dragged the Show-If Formlet tile. A Show-If Formlet container displays the formlet's fields and its rule, and provides a few quick links to editing tools. You can now Preview and Publish your form which now comprises a root form and a formlet.
The formlet container allows you to quickly edit all things related to the Show-If Formlet: "Edit Selection" allows you to change which formlet is selected to show when the rule is true, "Edit Rule" allows you to modify all parts of the rule, and the Open in Browser icon takes you to the Editor page of the selected formlet.
You can double-check that the rule is working as expected by testing it with an App Quicklaunch Form. As shown below, the formlet only appears after the Name field is filled in which validates that the rule for the Show-If Formlet is correctly working.