Results 1 to 3 of 3

Thread: combine jquery validate and captcha

  1. #1
    Join Date
    May 2015
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default combine jquery validate and captcha

    Hi folks,

    In order to check a form, I'm using jQuery validate v1.13.1.
    I also need a captcha and chose the one from tympanus/codrops.

    Unfortunately, they won't work together

    On submit, I need :
    - a check on required fields (with validate.js)
    - a check with the captcha.

    I can't manage to have them both work at once :

    Here's the code "validate" :

    Code:
    $("#form-contact").validate({
            //e.preventDefault();
                  rules: {
                  nom: "required",
                  email: "required",
                  tel: "required"
                   }
    });
    And the captcha :

    Code:
    $("#formsubmit").click(function(e){
            e.preventDefault();
           if($('ul').validate1() == true) {
           alert("Yeah, you are a human!")
           } else { 
           alert("No, you are not a human!") }
     });
    Anyone can help please ? any clue ? TY

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Do both on the submit event of the form.

    If you want more help. please post a link to the page on your site with the problematic code, so we can check it out.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    May 2015
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by jscheuer1 View Post
    Do both on the submit event of the form.
    I already tried this but can't have it run properly... I'm more of a PHP user though ^^

    The test page : HERE
    FYI : this site is for a friend of mine, not a professionnal project

    Thanks for the help

Similar Threads

  1. jQuery Validate with Ajax SubmitHandler
    By jdadwilson in forum JavaScript
    Replies: 0
    Last Post: 02-25-2014, 09:10 PM
  2. Jquery Validate one of the three fields
    By hemi519 in forum JavaScript
    Replies: 0
    Last Post: 10-30-2012, 12:48 PM
  3. jQuery validate form - submit prematurely
    By snooper in forum JavaScript
    Replies: 0
    Last Post: 09-27-2011, 02:42 PM
  4. Replies: 13
    Last Post: 02-18-2011, 05:51 AM
  5. Captcha
    By Scrounger in forum Other
    Replies: 3
    Last Post: 05-30-2008, 11:59 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •