All the code given in this post has been tested and is intended to address the question asked.
Unless stated otherwise it is not just a demonstration.
I tried it in on my website and just by itself, it is still allowing me to hit submit without checking the box.
requiredattribute? In the code I wrote, the
submitbutton is only disabled if that attribute isn't supported. If the attribute is supported, the browser should block submission and provide a browser-native warning indicating that the box needs to be checked.
This, of course, also means you can't have disabled automatic form validation with a
If those aren't the issue, I'd post your revised code and the browser name and version with the issue.