If you have a checkbox on your form that has to be selected before you want the user to continue you can use jquery to check if it has been selected by doing something like the following:
$(document).ready(function () {
$('#SubmitForm').click(function () {
if ($('#Terms').attr('checked') == false) {
alert('please select the terms and conditions before continuing.')
return false;
}
});
});
Your html form must have a checkbox with an id value of Terms to match the javascript above.
<label><span class="pln">Please accept our terms and conditions</span></label>
<input type="checkbox" id="Terms">
<input type="submit" id="SubmitForm">
If it is crucial to have a checkbox ticked before continuing in your website or app you should validate on the server side as well but the above script should help to get you started.
Member discussion