Skip to main content

Advanced Logic

What is the Logic Feature?

The Logic feature lets you control and manipulate a field’s behavior dynamically. It allows you to set rules that can change field settings, update data values, modify the JSON schema, or trigger custom actions. You can apply multiple logic rules to a single field if needed.

Why Use the Logic Feature?

Use Logic when you need complex conditional behavior for a field. It helps you:

  • Show, hide, enable, or disable fields based on conditions.

  • Modify field settings or data values dynamically.

  • Set multiple triggers and different branches of actions for a single field.

Whether for simple conditions or complex dynamic forms, the Logic feature provides flexibility and control to create a tailored user experience.

Steps to Use Logic

To access the Logic feature, open the components settings of the conditional field and click the Logic tab. Click the +Add Logic button to create a new logic instance. Give the Logic instance a name that is easily identifiable in the future.

Triggers

Set the Trigger Type to determine how the condition is structured and triggered. Configuring the Trigger will depend on what type of Trigger Type is selected. The Trigger Types are listed below:

Simple: The Simple Trigger type utilizes the same UI and configuration methods found in the Conditional tab. Refer to the Simple Conditional Documentation for more information.

Javascript: Write your own custom conditionals using Javascript code. The Javascript Trigger type utilizes the same UI and configuration methods used for Advanced Conditionals. Refer to the Advanced Conditions Documentation for more information.

JSON Logic: Use JSON Logic as an alternative to Javascript when writing Logic Conditions. Refer to the JSON Logic Documentation for more information.

Event: Use the Event option when creating your own custom events on your form.

Actions

Now that our Trigger is set, add an action that will execute when the condition is triggered. Click the +Add Action button, give the Action a name, and select an action Type. This will dictate what type of action will execute when the condition is triggered.

There are four Action Types you can choose from:

Property: Conditionally change field settings such as Required, Label, Disabled, and more! Depending on the selected Component Property, configure the Set State to True or False (EX setting a required flag) or input the conditional property Text (EX changing the Label property).

Value: Change or populate data values in the conditional field using Javascript. The following variables are available to use in your Javascript code:

"row", "data", "component", and "result"

Merge Component Schema: Not all field settings and configurations are offered with the Property action type. Directly update the field Schema Definition to configure additional settings using Logic conditions, dynamically change labels or value selections, and populate interpolated data from other fields.

Custom Action Execute a custom event workflow. Typically coincides with other fields such as the Hidden Field, Data Source, and Button components.