Custom text boxes

I’m using the Shopify craft theme, I have added in custom text boxes to my products through codes. But when customers add data in the text boxes, the data doesn’t show up on the cart page or in my Shopify admin. I can’t seem to fix it. When they add custom data into the text box it only says “custom” yet there’s 2 custom text boxes and nothing at all shows up for the 2nd text box.

I have this code in my main-product.liquid:

{{ 'products.product.quantity.label' | t }}

{% assign product_title = product.title | downcase %}
{% if product_title == “camostar” or product_title == “y2k core” or product_title == “summer jam” or product_title == “chrome skies” or product_title == “ruby red” or product_title == “midnight” or product_title == “pastel bloom” or product_title == “deep treasure” %}

Enter Custom Size:
{% endif %}
Instagram Handle - for easy contact (Optional):

Add to Cart

And I have this code in my main-cart-items.liquid:

{%- for item in cart.items -%} {% if item.image %} {% comment %} Leave empty space due to a:empty CSS display: none rule {% endcomment %}
{{ item.image.alt | escape }}
{% endif %}

Hi @Sunshinestar ,

You can refer line item property

You just need to add the code as per this instruction, it will display fine

Ideally, you should share a link to your storefront so we can see the problem firsthand.

The code you’ve shared does not look much like Craft and problem may be elsewhere.

However, modern themes by Shopify require form property on inputs, otherwise these inputs would not be submitted when adding to cart.

So you should try modifying your code like this:

from


to


And from


to


URL is https://clawedculture.com/cart

Yep, that’s what I thought. The code you’ve shared in your original post is not the same currently on your site, but my recommendation still the same – add form=XXX property as I instructed above.

Hi @Sunshinestar ,

I checked and you need to add ‘form=“{{ product_form_id }}”’ for input, it will work fine. Refer code: