HIDE

Conditional Logic

In this article you will learn how to apply conditional logic into your forms.
Conditional logic allows forms to trigger activities base on input conditions. Due to actual conditions, the feature would show/hide or change values of elements.

The Example

This is a very simple example of how to use conditional logic: I need to show a selection field if one checkbox field is checked.

“Beverage menu showed if customer checks Wanna drinks?

Demo



To do this:
Step 1: Create all fields: Foods, Wanna drink?, Drinks
Step 2: Edit Drinks field, in Editor Settings tab, open Conditional Logic, Enable
Step 3: Add Item, Set condition: Show this field if Wanna drink? checked.

Now save the form to finish.

Options of Conditional Logic

There are some options in coditional logic feature for various demands:
Speed: speed of the action triggered
Easing: swing or linear
Action: show or set value
If: select condition-based field

– Comparison Operators: 

  • not empty/empty: Usually used for the text, number, tel, email, or input field types
  • equals/not equals: Usually used for input or options field types
  • =, <, <= usually used for the text, number field type.
  • checked: Usually used for the radio, checkbox field type.
  • unchecked: Usually used for the radio, checkbox field type.
  • contains: The condition is triggered if the target field’s input contains the corresponding value. Usually used for the text, tel, number, email, or input field types. For example: in condition value setup: “abc” => if users fill out “abcdef” input in the target field, the conditional will be triggered.

Type Value

  • String: if the value contains letter characters or numbers
  • Number: applied for only number format.

OR, AND Operators: You can enable AND or OR settings during form creation.

  • With AND conditional logic, two or more requirements must be met by the site visitor in order for the condition to display.
  • On the other hand, for the OR conditional logic to work, a condition will display so long as one or more of the requirements are met by the site visitor inputting information.

Conditional Logic for Sections

Conditional logic for the section is located in the Editor Advanced tab:
Edit Section > Advance Tab > Conditional Logic > Click Enable

The feature is useful to build a highly interactive form with viewers, and promote a higher conversion rate.