Everformat Product Options · Shopify how-to

How to add an engraving field to a Shopify product

Shopify products have no engraving box out of the box. Here is how to add one with a few lines of theme code, and how we do it with our app if you would rather not touch code.

What an engraving field needs

An engraving field is a text input inside the product form whose name starts with properties[. Shopify saves its value as a line item property and carries it to the cart, checkout and the order, so you see the text when you fulfill.

It also needs a limit, so a shopper cannot order more text than fits on the item.

Method 1: theme code (free)

  1. In your Shopify admin, go to Online Store, then Themes, and click Customize. Open a product page.
  2. In the Product information section, click Add block and choose Custom Liquid. Drag it above the Buy buttons. Custom Liquid is built into Dawn and most Online Store 2.0 themes, so you do not edit any theme files.
  3. Paste the code below and save. The form attribute ties the input to the product form, so its value goes with Add to cart. maxlength stops typing after 20 characters.
  4. Add the product to your cart. The cart line should show "Engraving:" with the text. Place a test order and check it under the line item.
{%- assign form_id = 'product-form-' | append: section.id -%}
<p class="engraving-field">
  <label for="engraving-{{ section.id }}">Engraving text</label>
  <input id="engraving-{{ section.id }}" type="text" name="properties[Engraving]"
    form="{{ form_id }}" maxlength="20" autocomplete="off">
</p>

Dawn names the product form "product-form-" plus the section id. If your theme uses another name, find the form that posts to /cart/add on the product page and use its id.

What this does not cover: the field shows on every product that uses the template, maxlength counts the whole field rather than each line, nothing stops emoji or characters your engraver cannot cut, the shopper gets no preview, and the Buy it now button can send them to checkout without the field. Untick "Show dynamic checkout buttons" in the Buy buttons block if you rely on the field.

Method 2: Everformat Product Options (no code)

  1. Install Everformat Product Options from the Shopify App Store. The Free plan covers 3 option sets.
  2. On the app’s home page, click Turn on automatic embed and save your theme.
  3. Under Start from a template, pick Engraving text. It creates a required field of 2 lines with 20 characters each and a live preview, on one product so you can check it first.
  4. Open the field’s Engraving rules to change the lines (1 to 4), characters per line, allowed characters or UPPERCASE. Then choose which products get it: specific products, collections, tags or all products.
  5. Place a test order. The order shows the engraving text exactly as the preview showed it, with curly quotes straightened and extra spaces trimmed.

Everformat Product Options is our Shopify app for this. The Free plan covers 3 option sets with up to 10 fields each.

Get it on the Shopify App Store About the app

Questions

Where does the engraving text show up?

Under the line item in the cart, at checkout and on the order in your Shopify admin.

Can I charge extra for engraving?

Line item properties do not change the price. The usual way is a product option such as "Engraving: Yes / No" with a higher price on the Yes variant. Our app cannot add a price yet.

Does the app change my theme code?

No. It uses a theme app embed or block, and removing the app leaves your theme as it was.

More guides