I have a bunch of forms with a checkbox in each of them and when a condition is met i want to disable every checkbox that is NOT checked.
I've tried doing this but with no luck
if (updateShowcasedProducts.length == 12) {
document.querySelectorAll('input[type="checkbox"]:not(:checked)').disabled = true;
}
I would preferably only use vanilla javascript.