Conditional Logic
A form with 30 fields feels overwhelming to a requester, especially when half those fields don’t apply to their situation. If someone is requesting an NDA, they shouldn’t see fields about service scope or SLA terms.
Conditional logic lets you show or hide fields based on how the requester answers earlier questions, and route submissions to different outcomes based on the overall response. The same form can serve multiple contract types without exposing irrelevant questions.
Field Conditions
Section titled “Field Conditions”Field conditions control whether a field is visible on the form. When a condition evaluates to true, the field appears. When false, it’s hidden and any value in it is ignored.
Adding a condition to a field
Section titled “Adding a condition to a field”- Select a field in the form builder
- In the field editor panel, enable the Conditional toggle
- The condition builder opens
The condition builder
Section titled “The condition builder”The condition builder uses a tree structure with rules and groups:
Rules are individual comparisons. Each rule has:
- Field - Which other form field to check (selected from a dropdown of all fields)
- Operator - How to compare (see operator table below)
- Value - What to compare against
Groups combine multiple rules with AND or OR logic:
- AND - All rules in the group must be true
- OR - At least one rule in the group must be true
Groups can be nested inside other groups, allowing complex logic like: “Show this field when (contract type is NDA AND jurisdiction is APAC) OR (contract type is MSA AND value is above $50,000).”
Supported operators
Section titled “Supported operators”The operator options change depending on the field type being compared:
| Field Type | Available Operators |
|---|---|
| Text | equals, does not equal, contains, does not contain, begins with, ends with, is empty, is not empty |
| Number | = (equals), ≠ (not equal), < (less than), ≤ (less than or equal), > (greater than), ≥ (greater than or equal) |
| Yes/No | is, is not |
| Dropdown | includes, does not include |
| Party | is sanctioned, is not sanctioned, is entity, is not entity |
For dropdown (list) fields, “includes” checks whether the requester’s selection matches the value. For multi-select dropdowns, it checks whether any of the selections match.
Sub-field access for party fields
Section titled “Sub-field access for party fields”When building a condition on a party field, you can check specific attributes of the party using the sub-field option. For example, you can create a condition on the party’s email domain, entity name, or a custom attribute.
Action Conditions
Section titled “Action Conditions”Action conditions control which submission action fires when the form is submitted. They use the same condition builder as field conditions, but they’re configured on the form action rather than on a field.
A common pattern: one form with multiple actions, each gated by a condition on a dropdown field.
Example:
- Action 1: Generate NDA template, condition: “Agreement Type equals NDA”
- Action 2: Generate MSA template, condition: “Agreement Type equals MSA”
- Action 3: Redirect to external procurement form, condition: “Agreement Type equals Procurement”
When the requester submits, Pactly evaluates each action’s condition against the form answers. All actions whose conditions pass will execute (not just the first match). Actions without conditions always execute.
Invalid Condition Detection
Section titled “Invalid Condition Detection”The form builder automatically detects invalid conditions and shows a warning in the header. Common issues:
- Missing field - The condition references a field that has been deleted
- Missing value - The condition has a comparison but no value to compare against
- Type mismatch - The operator doesn’t match the field type (e.g., “greater than” on a text field)
The warning shows the number of invalid conditions and lists each one with the field name and the reason it’s invalid. Fix these before sharing the form.
Common Patterns
Section titled “Common Patterns”Contract type branching
Section titled “Contract type branching”Use a dropdown field at the top of the form for “Agreement Type” with options like NDA, MSA, SOW, Employment. Then:
- Add field conditions on subsequent fields to show/hide based on the selection
- Add action conditions on each form action to generate the correct template
Value threshold warnings
Section titled “Value threshold warnings”Use an output field with a condition checking whether a number field exceeds a threshold. Set the output type to “warning” and the message to explain the additional requirements (e.g., “Contracts above $100,000 require VP approval”).
Cascading dropdowns
Section titled “Cascading dropdowns”Use a condition on a second dropdown that checks the first dropdown’s value. For example, show a “Region” dropdown only when “Jurisdiction” is set to a value that has regional sub-options.
Party type-dependent fields
Section titled “Party type-dependent fields”Use conditions on additional fields that check whether the party field’s type is “entity” or “individual.” Show company registration fields for entities and personal ID fields for individuals.