Let me start by saying I am not developer or coder. I have followed Shopify's instructions on adding customizaton collection fields to my product templates and they show up fine. While I would love to be able to have the customization fields as part of the Buy Button code that we install on our off-Shopify website, that's not going to happen so I'm trying to shore up my listings to make sure the customer has a decent experience that I'm forcing him/her off my website and back to our Shopify store instead. Sorry for the vent.
I used Shopify's tools to generate this line of code and added it to the listing -- it works fine but, I'm just saying the personalization is limited to 40 characters. There is no way in the tool to actually stop them from going over and THAT will lead to customer service issues that no business can afford. I know that I'm missing something like ('maxlength','40'); that needs to go somewhere in this code but I have no idea where or what it actually needs to say.
Can you please help me? Thank you in advance for any assistance you can offer me!
<p class="line-item-property__field"> <label for="personalization-up-to-40-characters-including-spaces">Personalization Up to 40 Characters, Including Spaces</label> <input required class="required" id="personalization-up-to-40-characters-including-spaces" type="text" name="properties[Personalization Up to 40 Characters, Including Spaces]"> </p>
Solved! Go to the solution
This is an accepted solution.
<input required maxlength="40" class="required" id="personalization-up-to-40-characters-including-spaces" type="text" name="properties[Personalization Up to 40 Characters, Including Spaces]">
Note: Just add maxlength="40"
Let me know if need help
Just used your text character limiting code. Thankyou. Worked perfectly on my PC and on an iphone but for some reason on a Samsung phone using Chrome I can continue to type more than the alloted amount of characters into the text box. I have customised and item in my store and wanted to reduce the number of characters to 5. If I type numbers it works but if I type letters it continues to go past 5 characters. When I add the item to the cart then it works removing all the extra characters that were in the box. I'm really confused about this. Would you have any idea why this is happening?