Inserting a required field on product page

New Member
2 0 0

Hi everyone. I need to insert a required field box when customers are on a product page. Currently the field box is there but I want to change it so that it is a requirement to fill it in. The code right now is:

<label for="giftnote">Gift note</label>
<textarea rows="2" id="giftnote" type="text" name="properties[Giftnote]" placeholder="Please write gift note here or NONE if not need" required="required">{% if form.body %}{{ form.body }}{% endif %}</textarea>


Putting the "required" code doesn't make a difference; when the customer clocks add to cart, it allows if rather than prompting them to fill in the box. 


How do I get the gift note box to be required? Thanks!

Shopify Partner
1023 214 464



Send me your srore URL so I can check and assist you better.


Thank you,


Shopify Expert | Skype: tejas.nadpara
- Like and Mark as an Accepted Solution if reply helpful
- Feel free to contact me on regarding any help