Basic Conditional Logic: Show/Hide Option B Based on Option A
Customizations

Basic Conditional Logic: Show/Hide Option B Based on Option A

3 min read Updated Nov 20, 2026

Overview#

Feature Type: Building Options / Display Logic
Live Demo: View Live Demo on Aris Demo Store


1. Feature Overview & Merchant Use Cases#

Conditional Logic lets you show, hide, or disable a product option depending on what the customer selects in another option. Instead of filling your product page with fields that only some shoppers need, you reveal each field at the moment it becomes relevant. The result is a cleaner product page and a faster path to checkout.

In this guide, the option that makes the decision is called Option A (the controlling option), and the option that appears or disappears is called Option B (the dependent option).

Common Merchant Scenarios:

  • Gift Wrapping & Greeting Cards: Show a "Gift Note" text box only when the customer selects "Yes, add a gift box".

  • Custom Dimensions: Reveal width and height inputs only when the shopper selects "Custom Size" instead of a standard size.

  • Material-Specific Options: Reveal leather color swatches only when "Genuine Leather" is selected as the material.

  • Logo / Artwork Upload: Reveal a file upload field only when the customer chooses "Custom Logo Print" instead of "Blank".


2. Storefront Experience & Live Demo#

You can try a working example on our demo store:

How It Looks to Your Customers:

  1. Initial State: The customer sees only Option A (for example, a set of radio buttons). Option B is hidden.

  2. Triggered State: When the customer selects the value you defined in your rule, Option B appears directly below Option A.

  3. Switching Back: If the customer changes their selection so the rule no longer matches, Option B is hidden again. Anything the customer typed or selected in Option B is cleared and is not added to the cart.


3. Step-by-Step Setup Guide in Shopify Admin#

The screenshots below use a simple example: Option A is a Radio Buttons option, and Option B is a Single line text option that only shows when a specific radio value is selected.

Step 1: Open the Option Set Builder

  1. Go to Shopify Admin > Apps > Aris Product Options.

  2. Go to Option Sets and click Create Option Set (or open an existing one).

  3. Under Setup flow, make sure 1 Build options is selected.

  4. Click Add first option (or Add option if the set already contains options).

Click Add first option in the Setup flow

Step 2: Create Option A (The Controlling Option)

  1. In the Add Options window, stay on the New options tab.

  2. Under Choices, tick Radio Buttons (you can also use Drop-Down Menu, Button, or a swatch type).

  3. Click Select to add it to your Option Set.

  4. Open the new option and enter its values (for example, Yes and No, or keep the default option_1 while testing).

Select Radio Buttons in the Add Options window

Step 3: Create Option B (The Dependent Option)

  1. Back in the options list, click Add option again.

  2. Under Text input, tick Single line text, then click Select.

  3. Your list now shows two options: Radio Buttons (Option A) and Single line text (Option B). The Preview panel on the right shows both options.

Single line text added below Radio Buttons in the options list

Step 4: Create the Rule on Option B and Select Option A

  1. Click Single line text in the options list to open its settings.

  2. Scroll down past the Value and Pricing sections to the Conditional logic section.

  3. Click Create conditional logic.

  4. Set the rule sentence to Show this option if All of the following match.

  5. Click the Select option... field and choose Radio Buttons, "Radio Buttons" (option_1).

Create conditional logic and select Radio Buttons as the controlling option

Step 5: Set the Operator and Value, Then Save

  1. In the operator dropdown, choose is equal to.

  2. Click the value field and type the value of Option A that should reveal Option B. A suggestion list shows the values of Option A, so you can pick the value from the list (in this example, option_1).

  3. To add another condition, click the plus icon (+) at the end of the row.

  4. Click Save in the Unsaved changes bar at the top of the page.


4. Rule & Operator Reference#

Rule Actions:

Action

Behavior on Storefront

Recommended Use Case

Show

The option stays hidden until the rule matches.

Add-on notes, file uploads, gift messages.

Hide

The option is visible by default and disappears when the rule matches.

Hiding customization fields when a "Standard" choice is selected.

Disable

The option stays visible but is greyed out and cannot be used when the rule matches. Its value is not added to the cart while disabled.

Showing a premium feature that is not available for the current choice.

Match Modes:

Mode

Meaning

All

The action applies only when every condition in the rule matches.

Any

The action applies when at least one condition in the rule matches.

Comparison Operators:

Operator

Matches When

Example

is equal to

The selected value is exactly the value you entered.

Selection Yes is equal to Yes.

is not equal to

The selected value is anything other than the value you entered.

Selection Standard is not equal to Custom.

contains

The selected value includes the text you entered.

Wood Frame 12x18 contains Wood.

does not contains

The selected value does not include the text you entered.

Silver does not contain Gold.

starts with

The selected value begins with the text you entered.

Custom - Ring starts with Custom.

ends with

The selected value ends with the text you entered.

Gift Box (Large) ends with (Large).

greater than

The number entered or selected is higher than your value.

Quantity 5 is greater than 3.

less than

The number entered or selected is lower than your value.

Quantity 2 is less than 10.

has any value

The customer has selected or entered anything in Option A.

Any choice has been made.

has no value

Option A is still empty or unselected.

The customer has not filled in the field yet.


5. Pro Tips & Common Pitfalls#

Important — Same Option Set Only
Conditional logic works only between options in the same Option Set. An option in one Option Set cannot control an option in another Option Set.

Important — Match the Value Spelling Exactly
The value you type in the rule must match the value of Option A exactly. If Option A's value is option_1, typing Option 1 will not match with is equal to. Pick the value from the suggestion list under the value field to avoid typos.

Important — Text Matching Is Case-Sensitive
All text operators (is equal to, contains, starts with, ends with, and their opposites) compare letters exactly, including uppercase and lowercase. A rule with yes will not match the value Yes.

Pro Tip — Required Fields That Are Hidden
If Option B is marked as Required but is hidden by your rule, customers can still add the product to the cart. The required check applies again as soon as Option B becomes visible.

Pro Tip — Renaming Option Values
If you later rename a value in Option A, open Option B's Conditional logic section and update the rule value to the new name.


6. Frequently Asked Questions (FAQ)#

Q1: Can I base conditional logic on native Shopify variants?

Yes. In the Select option... list, choose Shopify variant as the controlling source. See the guide Conditional Logic Between Aris Options and Shopify Native Variants for full steps.

Q2: Can one option control several dependent options?

Yes. Add a rule to each dependent option (for example, Engraving Text, Engraving Font, and Engraving Placement) and point every rule to the same Option A value.

Q3: How many conditions can I add to one option?

Click the plus icon (+) to add more condition rows to a rule, and use All or Any to decide how those conditions combine.

Q4: What if Option A allows several selections, such as Checkboxes?

The rule matches as soon as any one of the selected values meets the condition. For example, with is equal to Gift Wrap, Option B appears whenever Gift Wrap is one of the ticked boxes.

Was this article helpful?

If you still need help, our support team is here for you.

Contact Support