Skip to content

Older form fields

To add a field to checkout now, such as a gift message, a delivery date picker or a terms checkbox, use Custom fields. Like every checkout block, it needs Shopify Plus.

This page and the pages in Older form fields cover the form blocks made before October 12, 2026: Text field, Text area, Form fields, Select, Checkbox, Multiple checkboxes, Radio, Date field, Date picker, Year-month-day and Phone. They keep working and keep their editor, but they’re no longer offered for new forms.

In Checkout Buddy, go to Customizations. A form whose type is Custom fields is the new kind. Any other form type, such as Text field or Form fields, is an older form block.

Custom fields Older form blocks
Made From October 12, 2026 Before October 12, 2026
Field types Every type in one form builder One block type per field, or several in Form fields
In the Checkout Editor The Custom fields app block, with Block IDs The Checkout Buddy (v1) app block, with Fixed block ID or Multiple block IDs
Answer saved under Each field’s Cart attribute key The block’s Name, or an Attribute key set in effects
Order metafield Also save as a cart metafield Cart or checkout metafield effects
Show a field after another answer Built in: Show this field → Only when… A second block with a Cart attribute key, value condition
Translated choices save Your default language The translated label, unless the option has its own value
Other data on the order None __buddy_data from the app block, and __buddy_form_field from single-field Form field blocks
Guide Custom fields This page and the pages below

The rest of this page is about older form blocks.

Each answer is saved as a checkout attribute. Shopify copies checkout attributes to the order when it’s placed.

The attribute’s key (its name) is the block’s Name:

  • The Name is cut to its first 28 characters.
  • In blocks with more than one field, the second field’s key gets 2 added, the third 3, and so on. A block named “Delivery info” saves “Delivery info”, “Delivery info 2”, “Delivery info 3”.
  • To choose your own key instead, see effects below.

The value is what the customer entered:

Field Saved value
Text field, Text area, Phone The text as typed
Select, Radio The chosen option
Multiple checkboxes The ticked options, separated by commas
Checkbox true or false
Date field, Date picker, Year-month-day The date as YYYY-MM-DD
Timeslot The slot, such as 10:00 AM - 12:00 PM, under a separate key ending in _time

Open the order in Shopify admin. Checkout attributes are listed in the Additional details section.

Form answers on an order in Shopify admin under Additional details: Gift note, Delivery date, Delivery date_time, Is this a gift, Gift message, Referral source, and Accepted terms

Add the answer to notification templates such as Order confirmation (Shopify admin → Settings → Notifications) using the attribute key:

{% if attributes["Gift message"] %}
<p>Gift message: {{ attributes["Gift message"] }}</p>
{% endif %}

Flow can read checkout attributes from the order’s custom attributes, so you can tag orders, notify staff, or add notes based on an answer.

Some themes list cart attributes on the cart page. Keys that start with an underscore are usually hidden. See data and privacy.

Tick Customer must fill field to proceed in checkout to make a field required. An Error message field appears (default “Required”); customers see it when they try to continue without answering.

Text fields, text areas, and phone fields can check the answer against a pattern. Tick Apply validation and fill in:

  • Custom regex: a regular expression the answer must match.
  • Error message: shown when it doesn’t match. Validation only runs when both this and Custom regex are filled in.
  • Max length (characters): text areas only.
  • Block checkout progress if invalid: stop customers from continuing with an answer that doesn’t match. Without it, the message shows but customers can continue, unless the field is also required.

The pattern matches anywhere in the answer unless you anchor it. Start with ^ and end with $ to check the whole answer.

To allow Pattern
Only letters, numbers, and spaces ^[A-Za-z0-9 ]*$
Latin letters including accents, spaces, and hyphens ^[À-ÿA-Za-z \-]*$
A 5-digit number ^\d{5}$
A PO number like PO-12345 ^PO-\d+$

Test patterns at regex101.com (choose the JavaScript flavor).

The Year-month-day field has its own Minimum age (years) check. See date fields.

Checkbox, Multiple checkboxes, and Radio fields can start with an answer selected. Tick Apply default value and enter:

  • Checkbox: true to start checked.
  • Multiple checkboxes: the value (or label, if the option has no value) of the one option to tick.
  • Radio: the value (or label, if the option has no value) of the option to select.

The default is saved to the order straight away, even if the customer doesn’t touch the field.

Tick Apply effect when value changes and choose an Effect type to do more with the answer. The choices depend on the field type.

Effect What it does Fields
Apply value as checkout attribute Saves the answer under the Attribute key you enter instead of the block Name. All
Apply value as cart metafield Also saves the answer as a cart metafield, which Shopify copies to the order with the Metafield namespace and Metafield key you enter. All
Apply value as cart metafield (no checkout attribute) Saves the answer only as a cart metafield. All
Apply value as checkout metafield (deprecated) Also saves the answer as a checkout metafield on the order. Deprecated by Shopify: use the cart metafield option instead. All
Apply value as checkout metafield (deprecated, no checkout attribute) Saves the answer only as a checkout metafield. All
Apply value to order notes Adds the answer to the order note. Text field, Text area
Match value and apply discount code using metaobject’s metafield Applies a discount code when the answer matches an entry in a metaobject. Text field, Text area
Apply value to city shipping address field Also fills in the shipping city with the chosen option. Select
Apply value to shipping address phone field Also fills in the shipping phone. Phone

There are two ways to save an answer as an order metafield. Each field uses one or the other.

Apply value as checkout metafield (deprecated) Apply value as cart metafield
How it reaches the order Saved on the checkout, then on the order Saved on the cart, then copied to the order when it’s placed
Metafield definition Optional. Create one yourself to see answers on the order page Created by Checkout Buddy when you save the block
Namespace Always checkout_buddy checkout_buddy, or your own such as custom
Status Deprecated by Shopify: removed in its 2026-04 checkout API. Fields that use it keep working until Checkout Buddy upgrades to that version Recommended

Both save with the Metafield key you enter (spaces become underscores), in the checkout_buddy namespace unless you choose another. For example, key birthdate saves to checkout_buddy.birthdate. Values are saved as text.

The cart metafield options also have a Metafield namespace. Leave it empty to use checkout_buddy, or enter your own, such as custom, to save answers to an order metafield you already use in emails, Flow or other apps. A namespace is 3 to 255 characters and a key 2 to 64, using letters, numbers, hyphens and underscores.

To use a cart metafield:

  1. Tick Apply effect when value changes, choose Apply value as cart metafield and enter a Metafield key. To use your own namespace, enter it in Metafield namespace.
  2. Save the block. Checkout Buddy creates the order metafield definition with that namespace and key, set to copy the value from the cart, so answers show on the order page. It’s single line text, or multi-line text for a Text area.

If an order metafield definition with that namespace and key already exists, Checkout Buddy turns on copying from the cart for it. If that definition isn’t a text type, saving shows an error: use a different key.

If saving says Checkout Buddy doesn’t have access to orders, reload Checkout Buddy and approve the updated permissions Shopify asks for, then save again.

To switch a field from a checkout metafield, change its effect to the matching cart metafield option and save. Keep the same key and leave the namespace empty: the answers keep going to the same order metafield. Don’t use one namespace and key for a checkout metafield in one field and a cart metafield in another: when both are set, Shopify doesn’t copy the cart metafield.

With a checkout metafield, to see answers on orders, create a metafield definition once in Shopify admin under Settings → Custom data → Orders, with namespace and key checkout_buddy.birthdate and type Single line text.

Prefer the options with a checkout attribute over the “no checkout attribute” versions. The field uses its checkout attribute to remember the answer as the customer moves around checkout; without it, the field can appear empty again after the checkout updates.

Answers can’t be saved as metafields of either kind when the customer pays with an express checkout such as Apple Pay or Google Pay.

Apply value to order notes adds the answer as a new line in the order note each time the customer changes it. If a customer edits their answer, the note contains each version. Use the checkout attribute (on every field by default) as the reliable record.

Match value and apply discount code using metaobject’s metafield compares the customer’s answer to a list stored in a metaobject, and applies the matching discount code. For example, customers type a referrer’s name and get that referrer’s code.

  1. In Shopify admin, create the discount codes.

  2. Under Settings → Custom data → Metaobjects, create a metaobject definition with a JSON field (for example records), with Storefront access turned on.

  3. Add an entry whose JSON is a list of objects, such as:

    [
    { "name": "jamie", "code": "JAMIE10" },
    { "name": "alex", "code": "ALEX10" }
    ]
  4. In the field’s effect settings, enter the Metaobject handle, Metaobject type, and Metaobject field (records), then the Match value key (name) and Discount code key (code).

Matching ignores capitals but otherwise must be exact. If nothing matches, nothing happens and no message is shown.

Because every answer is saved as a checkout attribute, other blocks can react to it with the Cart attribute key and Cart attribute key and value conditions. For example, show a “Gift message” field only when a “This is a gift” checkbox is true. See the conditional form fields recipe. Custom fields forms do this within the form instead.

  • Place each form block in its own app block with a Fixed block ID. Otherwise another block may take its spot. See which block shows.
  • “Disable custom attributes” doesn’t stop form fields. That app block setting only stops Checkout Buddy’s analytics data. Form answers are always saved.
  • Translations change saved values. If you translate option labels, a customer checking out in French saves the French label, unless the option has its own value.
  • Field labels on Text, Text area, Select, date, and Phone fields are plain text. Checkbox labels support links only.
  • Don’t collect sensitive data such as passwords, ID numbers, or card numbers in form fields. Answers are stored as plain text on the order.