How to Add a REQUIRED Checkout Question !

west_village
New Member
1 0 0

I am not a master of HTML5 or any programing language. 

But, it took me 2 Days to figure out how to make a checkout question on the cart page required. 

I hope this is helpful to someone. 

 

<div class="field">
  <input name="attributes[your-question]" type="checkbox" required /> 
  <label>*Your Question </label>
</div>

A customer cannot proceed to check out unless they answer your required checkout questions with the code above.

 

The directions in the Shopify help section offers TOO MUCH code that does not yield the desired result. 

A Simple solution but a headache for anyone who doesn't program

0 Likes
Jason
Shopify Expert
10402 163 2045

A small sidenote, this will only work on browsers that support HTML5 form validation. Support for it is rather decent, but not awesome: http://caniuse.com/#feat=form-validation

Browsers that don't support it will simply ignore the required attribute.

I jump on these forums to help and share some insights. Not looking to be hired, and not looking for work.

Don't hand out staff invites or give admin password to forum members unless absolutely needed. In most cases the help you need can be handled without that.


★ http://freakdesign.com.au ★
0 Likes
ecom101
New Member
1 0 0

I agree that shopify's documentation is horrible.

 

Per your example, I can only find a way to alter the CART, not the CHECKOUT.

 

The examples i have seen only show a "cart" solution, which is no solution --  customers can use the "Buy it now" button and never visit the cart.

 

Does anyone have any way to add another question on the actual checkout? Is "shopify plus" required for that? And what should I expect to pay for that????

 

 

0 Likes
Wiket123
New Member
1 0 0

I know this was posted years ago, but where do I place this code? 

0 Likes