Summer Sales 20 Off for Piotnet Addons & Piotnet Forms

Best Conditional Logic Form for WordPress

The conditional logic form of Piotnet allows forms to trigger activities based on input conditions. Due to actual conditions, the feature would show/hide or change the values of elements.

condtional logic form wordpress piotnet

During filling out your WordPress forms, users could put in information and make some selections. Based on their information and selections, you can choose to:

  1. Show or hide some fields or sections
  2. Set or change the value for fields

With two simple actions, but there are a lot of cases in which you can use Piotnet forms conditional logic:

  • Show the “Submit Button” only when the checkbox is checked.
  • Show business category questions if users are business firms, and show personal category questions if they are not.
  • Corresponding fields appear only if users select the suitable options.
  • Based on the user’s nationality, change the tax rate of the tax field for price calculation.

In this article, you will learn how to apply conditional logic to your forms.

Conditional Logic Actions and Applications

"Show this field" action


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?

Step 1: Create 3 fields as below
  1. An Image Select field to supply Food options.
  2. An Acceptance field to check the option: Wanna Drinks?
  3. One more Image Select field with Drink options
Step 2: Enable "Conditional Logic" feature

Edit “Drinks” field -> in Editor Settings tab -> open Conditional Logic -> Enable it.

conditional logic 4

Add item to set a condition:

Show this field if “Wanna drink?” field is checked.

-> Save this form

Options of Conditional Logic

There are some options in conditional logic feature for various demands:

Speed: speed of the action triggered

Easing: swing or linear

Action: “Show this field” or “Set value”

If: select condition-based field

Comparison Operators: 

  1. not empty/empty: Usually used for the text, number, tel, email, or input field types
  2. equals/not equals: Usually used for input or options field types
  3. =, <, <= usually used for the text, number field type.
  4. checked: Usually used for the radio, checkbox field type.
  5. unchecked: Usually used for the radio, checkbox field type.
  6. 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

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

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

  1. With AND conditional logic, two or more requirements must be met by the site visitor in order for the condition to display.
  2. 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.

"Set Value" Action



As in the demo above, when users book a dentist doctor, it returns the corresponding email address in the “Email of Doctors” field.

In practice, you can set the field type of “Email of Doctors” to be a hidden field and embed its shortcode to Email action.

You can refer to this setup as below:

Step 1: Create essential fields
  1. An Image Select field to show Doctor Options
  2. A Hidden/Text field to display Doctor’s email addresses.
conditional logic 9
Step 2: Set up Conditional Logic

Edit that “Email of doctors” field -> scroll down to “Conditional Logic” -> enable it.

Add Items to set conditions

Action: choose “Set Value”

Value: fill out any value you desire to be. In case, it’s an email address

Set value for: Choose your target field shortcode

If: Choose a relevant field shortcode

Comparison Operators, Type Value, Value, Or/AND Operators work as in the previous explanation.

conditional logic 11

Conditional Logic for Columns/Sections or other Widgets

Conditional Logic for the columns/sections/other widgets is located in the Editor Advanced tab:
Edit Section > Advance Tab > Conditional Logic > Click Enable

enable conditional logic section

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

You can set conditions for fields/any elements between steps when using Multi-step form 
For Elementor users, you may try same feature in Piotnet Addons for Elementor.
See another Conditional feature of Piotnet Forms: Conditional Visibility.