Block: Custom field
You can collect additional customer information or block checkout with the custom field Checkout Block. Custom fields can be required or option and support a variety of input types including text, dropdown, checkbox, date picker, birthday, and more.
Save custom fields to order
All custom fields will save to the order as either an order metafield, order attribute, or the order note. We recommend using order metafields when possible as they are the most robust way of storing and retrieving custom data on orders within Shopify.
When saving custom fields to order metafields, the namespace using is checkoutblocks and the key is defined when you add a custom field to the block:
You can optionally create metafield definitions to surface specific custom fields directly on the order detail page. Here's a quick tutorial on creating a metafield definition for custom fields:
To avoid blocking checkout:
The metafield definition type that you choose is extremely important and setting a metafield type that does not support your custom field's data type can result in checkout being completely blocked for customers. Do not select "boolean" as Shopify does not support this type in checkout.
When in doubt, we recommend using "single line text" or "multi line text":
When saving custom fields to order notes, any existing content is completely replaced with your custom field. A benefit of using the order notes type is that it will show existing order notes entered in the cart within checkout automatically. This ensure consistency across the checkout funnel for specific use cases such as order notes or delivery notes.
When saving to order attributes (also known as note attributes or cart attributes), it's important to note that Shopify's native packing slips are not compatible. If you need to show saved values on packing slips, we recommend order metafields.
Adding Custom Fields into Existing Forms
At this time, Shopify does not support adding new fields into existing forms such as shipping address or billing address. Instead, we support adding custom fields above or below these forms.
Filtering orders by custom field
You can setup a Shopify Flow workflow to tag orders on creation based on the custom field value being present so that you can filter orders more easily within Shopify. Here's a sample Shopify Flow workflow to get started: https://cdn.shopify.com/s/files/1/0728/3241/8071/files/Tag_orders_that_have_agreed_to_terms.flow?v=1698702164