The following script using jQuery validation plugin - http://docs.jquery.com/Plugins/Validation - is preventing the form from sending that is found here:
http://www.bestcastleintown.co.uk/book2.php
Please fill in the form and watch the validation messages disappear then try to press send, this seems not to send and I don't understand why.
When this script is removed the contact form will function correctly and allow sending. Therefore I think it is causing the problem. Any help or suggestions would be much appreciated.
<script type="text/javascript">
jQuery.validator.setDefaults({
debug: true,
success: "valid"
});;
</script>
<script>
$(document).ready(function() {
$("#aform").validate({
rules: {
postcode: {required: true,minlength: 6},
phone: {required: true,number: true}
}
});
});
</script>
You are running the validator in debug mode. The relevant documentation says (emphasis mine):
debug Boolean Default:
false
Enables debug mode. If
true
, the form is not submitted and certain errors are displayed on the console (requires Firebug or Firebug lite). Try to enable when a form is just submitted instead of validation stopping the submit.
Removing the debug: true
option will fix your problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With