Note in Cart - Mandatory

New Member
2 0 0


I just created a note for the cart using the <brooklyn> template in shopify.

However, I would like this note to be  Required (mandatory). In other words, you would not be able to click on checkout without writing something in the note field. 

Does anyone know how to do this? 

Any help would be much appreciated. 


Shopify Staff
Shopify Staff
127 0 9

Hey there,

For that, you need to add in the required code.

I would suggest checking out the Markup Generator Tool for adding in a text form field cart attribute with the required field checked.

Here is an example of how the code would look:

<p class="cart-attribute__field">
  <label for="enter-details-here">Enter details here</label>
  <textarea required class="required" id="enter-details-here" name="attributes[Enter details here]">{{ cart.attributes["Enter details here"] }}</textarea>

Ensuring you have the proper required class set, that will prevent people that leave this field blank from proceeding to checkout.

Hope that helps!

Justin L

New Member
4 0 0

Does this still work in 2019? We tried adding required fields from the generator tool, to the cart, but were able to proceed without filling them out. If they're required, the user should not be permitted to proceed unless the fields are filled.

New Member
1 0 0

I have tried this and it hasn't worked as it still allows me to process through the check out without filling anything in.

Any ideas?