Custom Field in Product Description custom theme

Solved
JHKCreate
Shopify Partner
2810 480 686

This is an accepted solution.

Hi @shineveracruz 

The text input is now added only for products tagged with customized_fields_enabled

The final code to add was:

{% if product.tags contains "customized_fields_enabled" %}
<p class="line-item-property__field">
  <label class="single-option-radio__label" for="enter-your-name">Enter Your Name:</label>
  <input id="enter-your-name" type="text" name="properties[Enter Your Name]">
</p>
{%endif%}


Please don't forget to like our replies and mark the post as a solution if we've assisted you on that front

Cheers!

- Did we solve your issue? Like & Mark As Solution to help the community
- Should you need any direct help: contact@jhkcreate.com
- Learn more about us: jhkcreate.com

shineveracruz
Tourist
7 0 1

Thank you so much!  

A big big help. 

 

Cheers!

0 Likes
shineveracruz
Tourist
7 0 1

Hi, how can I make it required and only for 10 characters? Thank you

0 Likes
JVie
New Member
1 0 0

I am trying to get custom text options for my customers so they can personalize dog tags. I have followed the steps I have found but am not having any luck. Can someone please help?

0 Likes
JHKCreate
Shopify Partner
2810 480 686

Hi @JVie 

Would you mind sharing your store's address (privately if you'd like) so we can assist on that?

 

- Did we solve your issue? Like & Mark As Solution to help the community
- Should you need any direct help: contact@jhkcreate.com
- Learn more about us: jhkcreate.com

0 Likes
littlebundles
Tourist
8 0 2

thank you, this is helpful.

How do you do this so that it's only enabled for certain products? (as in, only some products require this field)?

I'm using Dawn and I think the usual way of doing this has changed with Shopify 2.0?

0 Likes
PaulNewton
Shopify Partner
3131 195 576

@littlebundles wrote:

How do you do this so that it's only enabled for certain products? (as in, only some products require this field)?

I'm using Dawn and I think the usual way of doing this has changed with Shopify 2.0?


Use alternate templates https://shopify.dev/themes/architecture/templates#alternate-templates 
Or modify the logic to either check for a product handle, a certain tag, or a collection etc. The key factor is you have to better define what makes something part of "some products". 

Problem Solved? ✔️Accept and ? Like the solution so you can help others.
Buy me a coffee ☕ paypal.me/paulnewton or donate to eff.org
Confused? Busy? Buy a custom solution paull.newton+shopifyforum@gmail.com
0 Likes
kbaxter12
New Member
1 0 0

Hi there,

I'm not seeing the text that has been entered into the custom text fields I added to my page so I can't see what customers have written. Can you help me look into this please? 

0 Likes