6

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>

1 Answer 1

7

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.

1
  • Thank you for your time Frédéric, this has solved the problem. Jul 27, 2012 at 11:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.