For the complete documentation index, see llms.txt. This page is also available as Markdown.

Conditional Logic and Field Visibility

AC Custom Fields provides powerful conditional logic capabilities that allow you to create dynamic, interactive forms that respond to customer input.

AC Custom Fields - Conditional Logics

Understanding Conditional Logic

Conditional logic allows you to show or hide fields based on the values of other fields. This creates a more streamlined and personalized experience for customers by only showing relevant fields.

Basic Conditional Logic

Show/Hide Fields

The most common use of conditional logic is to control field visibility:

  • Show When: Display a field only when specific conditions are met

  • Hide When: Hide a field when specific conditions are met

  • Always Visible: Keep a field visible regardless of other field values

Condition Types

Create conditions based on various comparisons:

  • Equals: Show/hide when a field equals a specific value

  • Does Not Equal: Show/hide when a field does not equal a specific value

  • Contains: Show/hide when a text field contains specific text

  • Does Not Contain: Show/hide when a text field does not contain specific text

  • Greater Than: Show/hide when a number field is greater than a specific value

  • Less Than: Show/hide when a number field is less than a specific value

  • Is Empty: Show/hide when a field has no value

  • Is Not Empty: Show/hide when a field has any value

  • Is Checked: Show/hide when a checkbox is checked

  • Is Not Checked: Show/hide when a checkbox is not checked

Advanced Conditional Logic

Multiple Conditions

Combine multiple conditions for more complex logic:

  • AND Logic: Require all conditions to be true (e.g., Field A = "Yes" AND Field B > 10)

  • OR Logic: Require any condition to be true (e.g., Field A = "Yes" OR Field B > 10)

  • Mixed Logic: Create complex rules with both AND and OR operators

Nested Conditions

Create hierarchical condition structures:

  • Condition Groups: Group related conditions together

  • Nested Rules: Create conditions within conditions

Chained Conditions

Create cascading effects where:

  • Field A controls the visibility of Field B

  • Field B controls the visibility of Field C

  • And so on...

Field-Specific Conditional Logic

Text Field Conditions

  • Show/hide based on specific text entered

  • Show/hide based on text length

  • Show/hide based on text format (email, URL, etc.)

Number Field Conditions

  • Show/hide based on numeric value

  • Show/hide based on range (between two values)

  • Show/hide based on comparison to other number fields

Date Field Conditions

  • Show/hide based on specific dates

  • Show/hide based on date ranges

  • Show/hide based on relative dates (e.g., future dates only)

  • Show/hide based on selected option(s)

  • Show/hide based on whether default option is selected

  • Show/hide based on number of options selected (for multi-select)

Checkbox Field Conditions

  • Show/hide based on checked/unchecked state

  • Show/hide based on number of checkboxes selected in a group

Conditional Actions

Beyond showing and hiding fields, conditional logic can trigger other actions:

  • Make Required: Dynamically make a field required based on conditions

  • Change Label: Modify a field's label based on conditions

  • Change Help Text: Update a field's help text based on conditions

  • Change Placeholder: Update a field's placeholder text based on conditions

  • Change Default Value: Set a different default value based on conditions

Conditional Logic Use Cases

Product Customization

  • Show engraving options only when "Add Engraving" is selected

  • Display size chart only for specific product categories

  • Show gift wrapping options only when "This is a gift" is checked

Order Requirements

  • Show shipping address fields only when "Ship to different address" is selected

  • Display business fields only when "Business Purchase" is selected

  • Show additional information fields based on product type

Form Branching

  • Create multi-path forms where different questions appear based on previous answers

  • Skip irrelevant sections based on customer selections

  • Create "wizard-style" forms with conditional progression

Last updated