Show/Hide

Purpose

The Show/Hide section controls when sections, rows, or individual elements in a Smartform should be visible.

Show/Hide rules can be used to create interactive and adaptive forms by reacting to:

  • Incoming data when the form is created
  • User input while the form is being filled out

Unlike Data Transformation, Show/Hide rules do not require variables.
You can create visibility logic directly based on values from form elements.


How Show/Hide Works

Show/Hide rules are evaluated whenever relevant values change.

Rules can be triggered by:

  • Form element values

    • Checkbox checked or unchecked
    • Dropdown selection
    • Text or number entered in an input field
  • Variables

    • Values passed in when the Smartform is created (API, Workflow, Dataset)
    • Values derived using Data Transformation rules

As values change, visibility rules are automatically re-evaluated and the form updates in real time.


Using Show/Hide Without Variables

Show/Hide can be configured without defining any variables.

You can:

  • Reference elements directly
  • Use the element’s current value as the condition

Example:

  • IF checkbox Has children is checked
    → Show section Children Details

This makes Show/Hide quick and easy to use for simple, user-driven logic.


Using Show/Hide With Variables

Show/Hide can also use variables when visibility depends on:

  • Data passed in when the form is created
  • Calculated or derived values from Data Transformation

Example:

  • IF variable isMinor = true
    → Hide signing section

Both approaches can be combined in the same Smartform.


What Can Be Shown or Hidden

Show/Hide rules can target:

  • Sections – entire form sections
  • Rows – layout rows inside sections
  • Elements – individual components such as:
    • Input fields
    • Text elements
    • Tables
    • Buttons

Creating a Show/Hide Rule

Step-by-step

  1. Open the Smartform in Studio
  2. Go to Rules
  3. Select Show/Hide
  4. Click Add Rule
  5. Enter a Rule Name
  6. Choose Always Run or conditional logic
  7. Define conditions using elements or variables
  8. Select what should be shown or hidden
  9. Click Add Rule to save

Always Run

When Always Run is enabled, the visibility logic is always applied.

Typical Use Cases

  • Always hide technical or internal elements
  • Always show mandatory information
  • Define base visibility rules

Conditional Show/Hide Rules

When Always Run is disabled, visibility depends on conditions.

Conditions (IF)

Conditions can be based on:

  • Element values
  • Variables
  • Or a combination of both

Conditions support:

  • AND / OR
  • Multiple condition groups (combined using AND)

Action Types

Direct Show / Hide

Show or hide selected targets when conditions are met.

Case / Switch

Use Case / Switch to define different visibility outcomes based on a single value.

Example:

  • Switch on dropdown User type
    • Private → Show section Personal Details
    • Company → Show section Company Details

Typical Use Cases

  • Show follow-up questions based on user answers
  • Hide irrelevant sections dynamically
  • Guide users through conditional form flows
  • Adapt content based on incoming data or user interaction

Dependencies and Notes

  • Variables are optional for Show/Hide
  • Rules react to live changes in element values
  • Data Transformation rules are evaluated before Show/Hide
  • Multiple Show/Hide rules can affect the same targets
  • Visibility logic can be tested using the Test Runner

Best Practices

  • Use element-based rules for simple interaction logic
  • Use variables for complex or cross-form conditions
  • Keep rules focused and readable
  • Use Case / Switch for multiple scenarios
  • Test with both initial data and live user input

Show/Hide rules allow Smartforms to respond dynamically to both user interaction and incoming data, without requiring complex setup.