Solved

Accept terms and condition checkbox must not be editable by inspect element.

WizardofDeath
Tourist
12 0 1

I have written a code for customer to accept terms and condition on cart page before pressing checkout button. The functionality works great. 

The only issue that i face here is there are some tech savy customers who click on terms and condition checkbox --> go to inspect element --> uncheck the checkbox --> presss checkout button and goes to checkout page without accepting terms and condition.

I dont want to disable inspect element for the same.

I want to make modification in my code where even if customer unticks the checkbox via inspect element, he should not be able to move to checkout page.

here is my code:

<div class="form-group terms-and-conditions cart-attribute__field">
<input type="hidden" name="attributes[terms-and-conditions]" value="No">
<input
required
class="required input--terms-and-conditions"
type="checkbox"
name="attributes[terms-and-conditions]"
value="I agree to the terms and conditions"{% if cart.attributes["terms-and-conditions"] == "I agree to the terms and conditions" %} checked{% endif %}>
<label>I've read and accept the <a href="pages/terms-and-conditions">terms and conditions.</a></label>
</div>

Accepted Solution (1)

soulchild37
Shopify Partner
163 9 46

This is an accepted solution.

I dont think it is possible to disable edit on inspect element, it is a web browser function.

Would it be better to add a text above the checkout button like "By clicking the checkout button, I accept the terms and condition" ?

Spent too much support time dealing with order cancellation request from customer? Wouldn't it be good if customer can cancel order on their own without bugging your support? Try out Cancellable app! https://apps.shopify.com/cancellable . I also write articles about store customization that can improve your customer shopping experience here : Yagi Software Blog

View solution in original post

Replies 2 (2)

soulchild37
Shopify Partner
163 9 46

This is an accepted solution.

I dont think it is possible to disable edit on inspect element, it is a web browser function.

Would it be better to add a text above the checkout button like "By clicking the checkout button, I accept the terms and condition" ?

Spent too much support time dealing with order cancellation request from customer? Wouldn't it be good if customer can cancel order on their own without bugging your support? Try out Cancellable app! https://apps.shopify.com/cancellable . I also write articles about store customization that can improve your customer shopping experience here : Yagi Software Blog
WizardofDeath
Tourist
12 0 1

Hi soulchild37,

 keeping checkbox is mandatory. It is just that customer should not edit via inspect element. I am worried of how can I achieve this?