How can I make cart notes required before checkout?

I had previously had it working so a customer had to input a cart note before checkout and it suddenly stopped working. We are using the Expanse theme and it is currently unpublished.

novalidate is deleted. I’ve tried:

required class=“required”

inputmode required

required

I also tested out a box using the UI elements generator and THAT worked but even using that as a reference it won’t require it.

Here is the code I had before that stopped working:

{{ cart.note }}

And this is the cart attributes code that does work:

Cart Note {{ cart.attributes["Cart Note"] }}

And this is how I combined the two:

{{ cart.note }}

Any suggestions would be appreciated!

Hi @Liz_CS . You need to add the required attribute in your cart note input. You can see the below image there I add a required attribute and when I clicked checkout it is asking me to enter value in the cart note.

You can inspect your cart note field to find which input you need to add required attribute.
Let us know if this works for you or not. Feel free to ask any question.

I have tried that already, as mentioned in the post, but I just tried again and it still didn’t work, for some mysterious reason. Currently it is

{{ cart.note }}

Solved it! Under the class section I had to change “hide” to “show”. This also solved a placeholder text issue that was next on my list of fixes.