Make a cart note field compulsory before checking out

Topic summary

A user needs to make a “gift note” field mandatory on their Shopify cart page before checkout. The theme developers declined to help, stating it requires custom code modifications.

Current Status:

  • The user located the gift-note field in the theme code but is unsure where/how to properly add the “required” attribute
  • Simply adding “required” to the code didn’t work as expected

Suggested Solution:

  • Another user pointed out that the theme already has working examples of required fields (“agree to terms” checkbox and “postal code” input)
  • Recommendation is to examine how these existing required fields are implemented in the code and replicate that logic for the gift-note field

Next Steps:

  • The discussion remains open with the user needing specific guidance on code implementation
  • Option for paid implementation assistance was offered via email if self-implementation proves difficult
Summarized with AI on October 28. AI used: claude-sonnet-4-5-20250929.

Hello,

I’m looking to make our “gift note” field compulsory. Can someone please tell me how this would be done? I reached out to the theme developers but they can’t help as this would be to do with the code.

Please let me know what details/code you would need to see. Thank you.

https://indigoandjade.com.au/cart

Hello @indigoandjade ,

Solution is already available in your theme.
You have to just review it and apply according to your needs.
Check the ‘agree to terms’ checkbox field and ‘postal code’ input field. They are working the same as you need for the gift note field.

Regards
Naveen

Thank you, I found it in the code, would i put “required” in the code, and where?

},
“gift-note”: {
“type”: “gift-note”,
“settings”: {}
},
“order-note”: {
“type”: “order-note”,
“settings”: {}

Hi Naveen,

Thanks for your reply!

I’ve looked within the themes editor and you can see below that it’s not available as part of the theme, it has to be added into the code

Please correct me if i misunderstood you. Do you know how to edit this in the code? I found it and added “required” but it doesn’t seem to work.

Yes it has to be added into the code.

Please review the existing code and how it’s working. Once you find it you can apply the same in the gif field.
In order if you need me to implement it you can drop an email to discuss further.