Adding a personalization or custom line item in the Craft Theme

Topic summary

A merchant successfully migrated a product personalization/engraving feature from Shopify’s Debut theme to the Craft theme.

Original Challenge:

  • The previous method for adding custom text input fields wasn’t passing data through correctly in Craft
  • Initially considered modifying main-product.liquid with conditional logic to show fields only on specific products

Working Solution:
The merchant discovered Craft’s built-in “custom liquid” option within product information sections, eliminating the need for theme file modifications. They implemented custom code for text entry fields and checkboxes that successfully passes personalization data through to cart line items.

Key Technical Detail:
The critical element was adding form="product-form-{{ section.id }}" to make the input field properly submit with the product form.

Alternative Suggestions:

  • One user requested spacing guidance to prevent the input field from appearing too close to the “Add to Cart” button
  • Another contributor recommended the free Easify Product Options app as a no-code alternative, which offers a visual interface for creating custom text boxes with configurable character limits, placeholders, and help text
Summarized with AI on November 18. AI used: claude-sonnet-4-5-20250929.

I have been moving from the Debut theme to Craft over the past week and a sticking point was allowing for engraving on one of my products. I did the easily in Debut following instructions I found in this community.

The method I used I tried but the content of the input field wasn’t being passed through. It also looked messy. At first I thought I was going to have to add an “if” in the main-product.liquid because I only wanted the personalization field to be visible on a couple of products. Then I found there was a custom liquid option in the product information…The code I used which worked in Debut

Personalization

didn’t pass the personalization information

I found this on GitHub https://github.com/Shopify/dawn/pull/509

I made my mods… and put it in the custom liquid of the product information and it worked… information was passed through to the item in the cart etc. Here’s the code. I have also done a checkbox. I use separate custom liquid label for each custom function I need. Here’s the code for text entry.

Personalization

<input class=“field__input”
type=“text”
id=“personalization”
name=“properties[personalization]”
form=“product-form-{{ section.id }}”

Enter Text-less than 20 characters looks best

3 Likes

Amazing!

This line saved the day for me

form=“product-form-{{ section.id }}”

Thanks so much

Hi, Thanks for posting this.

One question if I could please.

how do you space it so it isnt so tight against the add to cart button below?

Thanks in advance.

Hi @lanterncozies ,

I’d like to suggest another alternative solution that allows you to set up a custom text box in just a few minutes using the Free version of the Easify Product Options app. Here’s a quick demonstration on how you can do it :hugs: :

  • Create a new option set:

  • Add the Text Box option type and customize its details, such as the option label, text length (min & max characters), help text, placeholder, info, and more.

  • Select the product(s) in your store where you want to add the Text Box.

It’s as simple as that! Trying out the Easify Product Options app can save you time and effort while providing the flexibility to create the custom text box you need :+1: .