Conditional logic

Shopify Conditional Options Logic — Show/Hide Fields Setup Guide

Conditional logic hides fields until customer needs them. "Show engraving text only if 'Add engraving' is checked." Keeps forms clean without limiting options. Here's the complete 2026 setup for Shopify — patterns, rules, apps, and common gotchas.

Last updated: August 14, 2026~9 min readBy the Print It My Way team

Why conditional logic matters

Compare two personalizer product pages selling a custom mug:

Without conditional logic (everything visible):

Customer sees 8 fields. Overwhelming. 30-40% abandon.

With conditional logic:

Customer sees 5 initial checkboxes. Progressive disclosure. Each subsequent field appears only when relevant. 15-25% conversion lift on complex products.

3 conditional patterns

Pattern 1: Show/hide single field

Simplest form. "Show Engraving Text field if 'Add Engraving' checkbox = checked." Most common — 70% of use cases.

Pattern 2: Show/hide field group

Multiple fields hidden together. "Show Wedding Section (bride name + groom name + date + venue) if Product Type = 'Wedding Invitation'." Prevents cluttering a product page with fields relevant to only one variant.

Pattern 3: Cascading dropdowns

Second dropdown's options depend on first dropdown's value. "Select Category first → Style options populate accordingly." Standard config UX for complex products (jewelry with metal → karat, apparel with brand → size chart).

Setup with Print It My Way Pro (5 minutes)

  1. Install Print It My Way Pro tier ($13.99/mo — conditional logic requires Pro)
  2. Dashboard → New Personalizer
  3. Add all fields (controlling + dependent)
  4. Click the dependent field → Conditional Logic tab
  5. Add rule: "Show if [Controlling Field] equals [Value]"
  6. Save + attach to product
  7. Test in preview mode — toggle controlling field, verify dependent shows/hides

AND / OR / NOT compound rules

Simple rules cover 80% of cases. For complex logic, personalizer apps support compound rules:

LogicExample ruleMeaning
SingleShow if A = yesStandard on/off toggle
ANDShow if A = yes AND B = redBoth conditions must be true
ORShow if A = yes OR B = premiumEither condition true
NOTShow if A != noShow unless specifically excluded
NestedShow if (A = yes AND B = red) OR C = urgentGrouped logic — parentheses matter

Print It My Way Pro supports single + AND + OR + NOT. Unlimited tier adds nested parenthesized rules. Bold Product Options supports similar patterns at $14.99+/mo.

Common use case: Wedding invitation

Wedding invitations have variable data based on ceremony style:

Setup:

  1. Dropdown: "Ceremony style" = Traditional / Destination / Elopement
  2. Show "Reception venue" text field if Ceremony style = Traditional
  3. Show "Reception time" text field if Ceremony style = Traditional
  4. Show "Travel details" text field if Ceremony style = Destination
  5. Show "Return by date" text field if Ceremony style = Destination
  6. Show "Intimate note" text field if Ceremony style = Elopement

Customer picks style; only relevant fields appear. Print file generation adapts based on style variant.

Common use case: Corporate gift branded product

Customer picks which branding elements they want. Each choice triggers relevant follow-up fields.

Common use case: Photo canvas with framing

Only relevant options appear based on customer's earlier choices.

Cascading dropdowns setup

Second dropdown depends on first. Two implementation approaches:

App-based (recommended)

Personalizer app filters second dropdown's options based on first's value. Configure in app dashboard: "For each value of Category, define the allowed Style options." No code required.

Custom JavaScript (advanced)

const cascadeMap = {
  'Necklace': ['Silver Chain', 'Gold Chain', 'Rose Gold Chain'],
  'Ring': ['Sterling Silver', '10k Gold', '14k Gold', '18k Gold', 'Platinum'],
  'Bracelet': ['Silver Bangle', 'Gold Bangle', 'Leather Cord', 'Rope']
};

document.getElementById('category').addEventListener('change', (e) => {
  const category = e.target.value;
  const styleSelect = document.getElementById('style');
  styleSelect.innerHTML = '';
  cascadeMap[category].forEach(option => {
    const opt = document.createElement('option');
    opt.value = option;
    opt.textContent = option;
    styleSelect.appendChild(opt);
  });
});

Works on any theme but requires ongoing maintenance if catalog changes. App-based approach preferred for merchants without developer resources.

Handling filled dependent fields when parent changes

Common UX question: customer fills the engraving text, then unchecks "Add engraving" — what happens to their text?

Three approaches, ranked by UX quality:

  1. Preserve in memory (best): text hidden but not cleared. If customer re-enables, their text is still there. Print It My Way default.
  2. Confirm before clearing: modal "This will clear your engraving text. Continue?" Some merchants prefer this to prevent accidental data loss.
  3. Silent clear: text discarded immediately. Simplest to implement but worst UX — customer's work vanishes.

Performance considerations

Conditional logic evaluates on every field change. Modern implementations are sub-5ms overhead:

Print It My Way's rule engine is under 3 KB gzipped. Bold's is slightly larger but still under 10 KB. Custom JS implementations vary — avoid heavy state management frameworks for simple show/hide logic.

Cascading pricing (conditional + Cart Transform)

Conditional logic controls visibility; Cart Transform controls pricing. They combine:

Example: "Add gift wrap" checkbox (+$5 via Cart Transform). When unchecked, checkbox is hidden or off — fee = $0. When checked, fee = $5. Automatic through the combination of conditional visibility + Cart Transform rule.

App comparison

AppConditional logic supportCompound rulesCascading dropdownsEntry price
Print It My Way ProYesAND/OR/NOT + nested (Unlimited)Yes$13.99/mo
Bold Product OptionsYesAND/ORYes$14.99/mo
Hulk Product OptionsBasicSingle onlyLimited$8.90/mo
Fancy Product DesignerYesAND/ORYesMid-market
ZakekeYesAND/ORYes~$29.99/mo

Common issues + fixes

IssueCauseFix
Field doesn't show when controlling checkbox checkedRule references wrong field name or valueVerify exact field name + value (case-sensitive) in rule config
Nested rule not evaluatingMissing parentheses in compound ruleExplicitly group: (A=yes AND B=red) OR C=urgent
Filled field's data lost when hiddenSilent clear behaviorEnable "Preserve in memory" in app settings
Cascading dropdown shows stale optionsSecond dropdown not re-populated on parent changeVerify change event fires; check console for JS errors
Conditional fee still applied when field hiddenCart Transform reading raw attribute valuePersonalizer should clear attribute when field hidden; verify app does this

Frequently asked questions

What is conditional logic in Shopify options?

Rules that show or hide fields based on other selections. E.g. "Show engraving text only if 'Add engraving' checkbox is checked." Keeps forms clean without limiting choice.

Best app for conditional logic on Shopify?

Print It My Way Pro ($13.99/mo) — supports AND/OR/NOT + nested rules. Bold Product Options ($14.99+/mo) similar. Hulk ($8.90/mo) basic single-rule only.

Can rules use AND/OR/NOT?

Yes on modern apps. Compound rules like "Show if A=yes AND B=red" or "Show if A=yes OR B=premium". Nested parentheses supported on Print It My Way Unlimited.

Do hidden fields count against page load?

Minimal impact — hidden fields not rendered until shown. Rule engine adds ~3-10 KB gzipped depending on app. Under 5ms evaluation per change.

What happens if customer changes parent after filling dependent?

Best practice: preserve dependent field value in memory, restore if re-enabled. Print It My Way default. Silent clear = worst UX.

How to build cascading dropdowns?

App-based (Print It My Way Pro, Bold): configure allowed second-dropdown values per first-dropdown value. No code. Alternative: custom JS on product page.

Does conditional logic work with variants?

Yes but tricky. Conditional logic hides personalizer fields (line-item properties), not native Shopify variants. For conditional variants, use app-based variant filter.

Can conditional pricing work?

Yes via Cart Transform + conditional visibility combined. Hidden field's fee doesn't apply; visible field's fee does. Automatic through the combination.

Best use case for conditional logic?

Complex products with 8+ fields — weddings, corporate gifting, configurable jewelry. 15-25% conversion lift vs everything visible.

How to test conditional logic?

App's preview mode. Toggle each controlling field; verify dependent shows/hides correctly. Also test on real product page in incognito.

Related setup guides

Conditional logic on Shopify

Print It My Way Pro ($13.99/mo) includes conditional logic with AND/OR/NOT rules + cascading dropdowns + preserved field state. Free plan available for testing.

Install Print It My Way