Skip to content
On this page
Block guide Custom Fields 1 min read Updated Sep 28, 2026

How to set up the Text Input block

In short

Text Input adds a one-line text box to checkout, such as a PO number or gate code. What the buyer types is saved on the order. You can also check the format, like exactly 5 digits.

Category

Custom Fields

Plan

Advanced & Deluxe

Where it shows

Shopify checkout

Saves to order

Attribute or metafield

✓ Applies to

  • Advanced and Deluxe plans
  • Shopify Plus checkout
  • Any checkout position: body, after the header, or around the delivery address

✕ Doesn't apply to

  • Multi-line answers. Use the Gift Message block for longer text
  • Thank-you and order status pages
Need the field to stop checkout until it's filled? Nest it in a Conditional Checkbox →
Checkout
Order summary 1 item
Cotton Crew Tee
Qty 1 · Midnight
$48.00
Delivery instructions
Leave at the front door
Optional · 120 characters max
What your buyer sees in checkout

Set it up

1

Add a Text Input

Go to Blocks → Create New Block → Start Fresh. Click Add block and choose Text Input.

2

Name the field

Type the Label buyers see, like PO number.

3

Choose where the answer is saved

Pick Attribute and type a name, like po_number. You’ll find it on the order under Additional details.

4

(Optional) Check the format

A Pattern is a rule for what’s allowed. For a 5-digit postcode, use ^[0-9]{5}$ and an Error Message like Please enter exactly 5 digits.

5

Save and place it

Click Done, then Save. Copy the Block ID and paste it into a Custom Block in the checkout editor. See how.

Check it works

  1. Place a test order with something typed in the field.
  2. Open the order in Orders. The answer is under Additional details.

Good to know

  • On its own, this field never stops checkout, even when Required is Yes. To make it truly required, put it inside a Conditional Checkbox.
  • A wrong format shows the error, but the answer is still saved.
  • One line only. For longer notes, use Gift Message.
  • Saving to a metafield needs extra setup. Here’s how.

Not working?

  • Answer not on the order: it saves when the buyer clicks out of the field. Look for your attribute name (or the Label, if you left the name blank).
  • Error never shows: the pattern is empty or invalid. Add ^ at the start and $ at the end.

Want to see this block in a live checkout first? See examples and use cases →

Frequently asked

Where do I see what the buyer typed? +

With attribute storage, open the order in Shopify admin and look under Additional details. The attribute name is the one you set under Where to store the value, or the field's Label if you left it blank.

Does a required Text Input stop the buyer from paying? +

Not on its own. A standalone Text Input shows an error in the field but never blocks checkout. Required fields only block checkout when the Text Input is nested inside a Conditional Checkbox and the buyer has ticked it.

What pattern syntax does validation use? +

A JavaScript regular expression. It isn't anchored for you, so add ^ and $ if the whole value must match, for example ^[0-9]{5}$ for a five-digit code.

Is an invalid value still saved? +

Yes. The field shows your Error Message, but the value the buyer typed is still written to the attribute or metafield.

Related guides

More Custom Fields blocks

Still stuck? Open the app and use Support to chat with the team, or contact us. Don't have the app yet? Install Checkout Ninja.