I use a form for signup with a checkbox with 'terms of use'
<form action="/signup/signup_success.html" id="regform" class="form-horizontal" novalidate="novalidate" autocomplete="off">
<fieldset>
<div class="checkbox">
<label for="agb" id="checkbox_validate" class="hide success">Please accept Terms of Use</label>
<label>
<input type="checkbox" name="agbcheckbox" id="agbcheckbox">
Yes <a target="_blank" href="http://example.de">Datenschutzbestimmungen</a>. </label>
</div>
<div class="buttonWrapper">
<button type="submit" class="try-button" >
Register
</button>
</div>
</fieldset>
</form>
<script>
//check if checkbox for terms of use is checked or not
$("#regform").submit(function(event) {
if ($('#agbcheckbox').prop('checked')) {
$('#checkbox_validate').removeClass('show').addClass('hide');
//checkbox for terms of use is checked
} else {
//checkbox for terms of use is NOT checked
$('#checkbox_validate').removeClass('hide').addClass('show');
}
});
</script>
if I add "action="/signup/signup_success.html" to my form, the checkbox validation do not work anymore. If I set the action to action="" the validation works correctly. I don´t find the problem. Thank you for your help!