1. Home
  2. Docs
  3. WowAddons Documentation
  4. Conditional Logic

Conditional Logic

In WowAddons, you can make some fields depend on others. This is called conditional logic. Think of it like saying, “If this happens, then show that.” There are mainly two reasons why you’d want to use conditional logic:

To show a field or to hide a field: You can make a field appear or disappear based on what someone chooses in another field.

Imagine you ask a question: “Do you want a custom message printed?

If someone chooses “Yes,” it means they want to add their own special message. In this case, it makes sense to show them a text box where they can actually type that message.

However, if they don’t want to add any custom message, they will not bother with the question.  The text box for typing the message becomes unnecessary. Conditional logic lets you hide that text box so it doesn’t clutter the page and confuse the user.

How to Set Up Conditional Logic in WowAddons

WowAddons currently gives you 24 different elements. You can access this setting on the “Conditional Logic Settings” tab of any of these elements. It’s pretty straightforward to find! 

Set Up Conditional Logic for the Text Box V1

The very first thing to remember is this: you always turn on conditional logic for the field that you want to show or hide.

Let’s go back to our earlier example. We only wanted to show a text box when someone chose “Yes” to add a custom message. So, you would enable the conditional logic on the text box element itself, not on the radio button.

Clear as day? Now, let’s understand how to set a logic.

  • First, enable the conditional logic for the element.
Enable Conditional Logic V1
  • Then, configure this complex seeing row, which is very easy indeed. 👇
  • Select Visibility -> this field if -> Select Match -> of these rules match.
Select Visibility and V1

In Select Visibility, you have two options:

  • Show: Display this field when the condition is met. (By default, it will remain hidden.)
  • Hide: Hide this field when the condition is met. (By default, it will be visible.)
Select Visibility Option V1

In Select Match, you also have two options:

  • Any: The condition will trigger if any one rule matches.
  • All: The condition will trigger only if all rules match.
Match Options for Rules V1

So, there are only four possible combinations:

  • Show this field if “Any” of these rules match
  • Show this field if “All” of these rules match and
  • Hide this field if “Any” of these rules match
  • Hide this field if “All” of these rules match

If you need further assistance, please contact our support team.

How to Set Rules in WowAddons

This is the final step to complete your conditional logic setup. Here, you’ll define the dependencies between this field and other elements, such as radio buttons. To set it up:

Add Rules for Conditional Logic V1
  • Click the Add New button.
  • Select the element you want to create a dependency with.
  • Choose the relation type from the available options.
  • Select the value to match.
  • Choose Publish and click Save to apply your configuration.
Conditioanl Logic Applied for product options on product page
Was this article helpful to you? Yes No