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

New Member
5 0 0

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">
class="required input--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>


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! . I also write articles about store customization that can improve your customer shopping experience here : Yagi Software Blog
New Member
5 0 0

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?