The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript jQuery Validation/Contact Form 7 Submits Even If Invalid

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #147144

    Wondering if anyone has ever seen this. Using jQuery Validate 1.11.1 on WordPress 3.6, jQuery 2.0.3 (but same results with 1.10.2). I use the line:


    No AJAX submitting, no parameters at all. jQuery Validate properly tags invalid fields as invalid, but the form submits with CF7 anyway.

    Other data: I also use jQuery Validate on this site for the WP-Members plugin registration and login forms, and it works fine. I also have another small WP site using the same versions of everything, and CF7 does not submit with invalid fields, even with identical CF7 form code.

    I checked the form HTML between the site that works and the one that doesn’t, and aside from an ID name, the code is absolutely identical.

    I tried both an input as well as button elements, and I get the same results.

    In desperation, I stripped all my JS code except for this line within the jQuery ready method function, I deactivated all WP plugins except CF7, and I stopped loading all JS files except for jQuery and my now-nearly-empty JS file. None of this helped.

    I traced through the uncompressed jQuery Validate with both the site and works and the one that doesn’t, and they follow the same pattern, and both return “false” back to jQuery.

    Any ideas?


    I’m now in the realm of the supernatural at this stage. I copied the WP-produced web page for this problem page and made a one-page website out of it, coping the assets it needs, and just changing the paths to the assets. That page successfully prevents form submission with invalid fields. I use TextWrangler to compare the HTML of the one-page site and my WP problem page, and the only difference are the paths to the assets. Neither one generates any errors in the webkit debugger. Yet one works, and one doesn’t.

    I now believe in evil magic.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.