You check if the submit button has been checked, which, of course, it will never be.
Submit the function form, not the submit button itself:
<input type="submit" value="submit" onclick="return checkAcknowledgement(this.form)"/>
You need a name in the field to find it:
Use the link to the form to access the check box:
<script type="text/javascript"> function checkAcknowledgement(frm){ var checked = frm.acknowledgement.checked; if (!checked){ alert('Please read through the acknowledgement and acknowledge it.'); } return checked; } </script>
Guffa source share