Changing the special instructions for seller text field to compulsory field (Brooklyn theme)

New Member
2 0 0

Hi, 

I would like to change the special instructions text field on the cart page to a compulsory field for people to fill in as I would need them to put in their delivery time and day preference. My website is www.ware.asia and my storefront password is erawstore

 

I tried adding in the additional code on the cart.liquid code by finding notes & special instructions in it. 

This is the modified code to make it a compulsory field before checkout but it still does not work. 

 

<div class="cart__note">
                  <label for="CartSpecialInstructions">{{ 'cart.general.note' | t }}</label>
                  <textarea name="note" class="input-full" required = "required" id="CartSpecialInstructions">{{ cart.note }}</textarea>
                </div>
                {% include 'snippet-local-delivery-cart' %}

 

Could someone help me in this? 

Thanks,

Candice 

0 Likes
Shopify Staff
Shopify Staff
100 0 15

Hey there Candice!

I can see that you have slightly modified the code in your cart.liquid since posting this question, and it looks as though you've got this figured out already :).

Changing this:

<textarea name="note" class="input-full" required = "required" id="CartSpecialInstructions">{{ cart.note }}</textarea>

To this instead:

<textarea name="note" class="input-full" id="CartSpecialInstructions" required>{{ cart.note }}</textarea>

Seems to have done the trick for you :). A few pieces of code looked to be just a little bit out of order in that particular snippet.

I'm showing that, if you try to checkout without entering any notes, the cart page says "Please enter your preferred delivery Date/Time.":

And it does not allow you to checkout until something is submitted in that field.

You should be all set from here! If you need anything else, feel free to e-mail us at support@shopify.com :)

0 Likes
New Member
1 0 0

I am facing the same issue. It checks out with even no user input even though the input field has the "required" keyword. Please help me with this.

Thanks,

Vin

0 Likes