I have 20 checkbox options (added via custom options) available so the customer can customise the product. I would like to make sure the customer has ticked/checked at least 6 of the checkboxes.

I have written some JS to count how many of the options have been checked and highlight the options in red if fewer than six have been selected, but how do I integrate that JS so the Add to Cart button will run my custom JS as well as the usual validation?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.