Skip to content

Configure fields

Admin → CDA Custom Fields → Fields → Add New Field (top-right).

The form has six sections:

  1. Custom Field — code, label, type, surface, active toggle
  2. Display & Defaults — placeholder, default value, options for select fields
  3. Visibility — restrict by store view and customer group
  4. Show on admin / invoice / customer account — where the value renders
  5. Product Page Bindings — only for applies_to = product_page
  6. Advanced — validation rules and conditional show/hide
SettingWhat it does
CodeLowercase machine name (vat_id). Used in REST/GraphQL responses, in form POST keys (cda_custom_fields[vat_id]), and as the storage key. Must be unique across all fields.
LabelWhat customers see (VAT / Tax ID). Translatable via i18n/en_US.csv.
Field TypeSee Field types for the full list.
Applies ToWhich storefront surface renders this field. See Surfaces.
ActiveToggle to take the field offline without deleting it. Existing values stay in DB.
RequiredAdds * to the label, blocks form submit if empty. Server-side enforced.
Sort OrderLower numbers render first within a surface.
SettingNotes
PlaceholderGrey ghost text inside the input. Hidden on focus.
Default ValuePre-filled before the customer types. Useful for Title defaulting to Mr. etc.
OptionsOnly for select, multiselect, checkbox, radio. Add as many as you need — value is what’s stored, label is what’s shown.

By default, a new field has no visibility restrictions — it shows on every store view, for every customer group.

To restrict:

  1. Toggle Restrict visibility on.
  2. Select one or more Store Views and/or Customer Groups.
  3. Save.
SettingRenders the value on…
Show on Admin Order ViewSales → Orders → [order detail] — Custom Fields section
Show on Invoice / PDFGenerated PDF invoices and credit memos
Show in Customer AccountCustomer’s My Orders → [order detail] (storefront)

All three default to on for a new field. Turn off any that don’t apply.

Only relevant when Applies To = Product detail page. Three binding strategies — combinable:

BindingWhen the field shows
Attribute SetProduct’s attribute set matches one of the selected sets
Include — Specific Product SKUsProduct’s SKU is in the list, even if its attribute set doesn’t match
Exclude — Specific Product SKUsProduct’s SKU is in the list — field is SUPPRESSED even if attribute set / include would match

Resolved as: (attribute_set match OR include match) AND NOT exclude match.

Advanced — Validation & Conditional Logic

Section titled “Advanced — Validation & Conditional Logic”

Optional JSON object that adds front-end validation. Example:

{
"min_length": 3,
"max_length": 50,
"regex": "^[A-Z0-9]+$"
}

The form-element validator runs these on submit. Server-side, the value is also stored within the field-type’s natural limits (varchar 64KB for text/select, text for textarea).

Hide a field unless rules match against other fields’ values. From the Advanced section, click Add Rule to add:

Show this field when [field_code] [operator] [value]

Operators:

OperatorMatches
equalsExact value
not_equalsAnything except this value
emptyField has no value
not_emptyField has any value
containsSubstring match (also works on multiselect arrays)

Multiple rules are ANDed. For OR logic, create separate fields with different rule sets — Magento’s UI doesn’t let us nest the rule tree any further.

See the dedicated Field types reference.

To skip filling the form by hand:

  • Quick Add — Single Field Presets (Templates page) — click any preset to open the New Field form pre-populated with code, label, type, options, placeholder, and applies_to. Edit if needed, then Save.
  • Use Case Templates (Templates page) — create a whole set of related fields in one click (Birthday Gift, B2B Wholesale, Engraving, etc.).

See Templates & presets for the full catalog.