Checkbox required does not pass validation
-
Hi. I’m encountering an issue with form validation. Namely, I have the following checkbox code:
<div class="checkbox checkbox--terms"> <input type="checkbox" id="demo-form-terms" class="checkbox__input" required> <div class="checkbox__label"> I hereby agree with the processing of my personal data on the purposes, with <a href="#" target="_blank" rel="noopener">Terms and Conditions</a> and <a href="#" target="_blank" rel="noopener">Privacy Policy</a> </div> </div>
However, the checkbox doesn’t pass validation when it’s checked. I always get the following error from the form:
Please fill in all the required fields.
If I make the checkbox not required, the form submits just fine. Obviously, it being a terms checkbox, I need it to be required though. Any possible solution for this?Thanks in advance.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Checkbox required does not pass validation’ is closed to new replies.