Results 1 to 10 of 10
  1. #1
    Join Date
    Sep 2007
    Location
    Neenah, WI
    Posts
    112
    Plugin Contributions
    0

    help question Add reCAPTCHa to Create Account Form

    Hello Everyone,

    I'm trying to install reCAPTCHA into my create account form and am having some trouble figuring out where to put the validation routine for the captcha. I'm not sure if the code belongs here:

    /includes/modules/create_account.php

    or here:

    /includes/modules/pages/create_account/jscript_form_check.php

    Thanks,

  2. #2
    Join Date
    Sep 2007
    Location
    Neenah, WI
    Posts
    112
    Plugin Contributions
    0

    help question Re: Add reCAPTCHa to Create Account Form

    Ok. I'm almost there. So far I've got the code to display the captcha installed properly. I'm having a problem with the validation routine. Currently, when a customer enters the contents of the form but forgets to enter the captcha the form displays an error telling them to enter it, which is what's supposed to happen. However, if the customer enters the captcha correctly the form doesn't process the contents properly; it just resets and all the information is lost. I need help writing the code so that the form processes properly and the customer is taken to the create account success page.

    Here's the code for the captcha in red as I have it in the create_account.php form:

    Code:
    /**
     * Process form contents
     */
    
    //BOF reCAPTCHA
    require_once('includes/templates/custom/templates/recaptchalib.php');
    $privatekey = "6LXXXXXXXXXXXXXXXXAT";  
    $captcha_resp = recaptcha_check_answer ($privatekey,
                                    $_SERVER["REMOTE_ADDR"],
                                    $_POST["recaptcha_challenge_field"],
                                    $_POST["recaptcha_response_field"]);
    
    if ($_POST['action'] == 'process' && !$captcha_resp->is_valid) {
        $error = true;
        
    }
    //EOF reCAPTCHA
    
    if (isset($_POST['action']) && ($_POST['action'] == 'process') && !$captcha_resp->is_valid) {
      $process = true;
    
      if (ACCOUNT_GENDER == 'true') {
        if (isset($_POST['gender'])) {
          $gender = zen_db_prepare_input($_POST['gender']);
        } else {
          $gender = false;
        }
      }
    
      if (isset($_POST['email_format'])) {
        $email_format = zen_db_prepare_input($_POST['email_format']);
      }
    Any ideas?
    Last edited by Kim; 18 Apr 2009 at 12:47 AM.

  3. #3
    Join Date
    Sep 2007
    Location
    Neenah, WI
    Posts
    112
    Plugin Contributions
    0

    Default Re: Add reCAPTCHa to Create Account Form

    Just an update for everyone: I figured everything out and all works perfectly now. If anyone should need help with installing reCAPTCHA on their website for either their contact us or create account forms, please let me know and I'll help you through it.

    Thanks,

  4. #4
    Join Date
    Aug 2006
    Location
    West Virginia
    Posts
    321
    Plugin Contributions
    1

    Default Re: Add reCAPTCHa to Create Account Form

    bsteinagel, I would like to add the reCaptcha to my 1.3.8 zencarts create an account page and whatever other pages its supposed to go on to stop idiots. Do you have a module or is it just altered files? If so can you help? Thanks!

  5. #5
    Join Date
    May 2010
    Location
    London, UK
    Posts
    1
    Plugin Contributions
    0

    Default Re: Add reCAPTCHa to Create Account Form

    Hi All,

    Just finished coding two forms (email form and questionnaire form) with Recaptcha and JQuery support.

    http://www.websitecreationhelp.com/e...naire_form.zip

    http://www.websitecreationhelp.com/e...email_form.zip

    You will need to register a Recaptcha Account from here:

    http://recaptcha.net/

    Once you have those codes simply insert them into the recaptchacodes.php file (provided) and then upload to the script files etc to your website. You will then have a form that is more secure in way of recaptcha.

    You will need to supply an email address in the index.php page so that the questionnaire answers can be emailed to you.

    Regards

    John
    FREE Website Creation Help - http://www.websitecreationhelp.com/

  6. #6
    Join Date
    Mar 2010
    Location
    California
    Posts
    236
    Plugin Contributions
    0

    Default Re: Add reCAPTCHa to Create Account Form

    I have no idea where these files go.

    Could I please get some instructions?

    I got the account and put the codes in the PHP file but am stuck from there.

    Thanks in advance for you help.

    Big Al

  7. #7
    Join Date
    Mar 2010
    Location
    California
    Posts
    236
    Plugin Contributions
    0

    Default Re: Add reCAPTCHa to Create Account Form

    Figured out the files but in Admin - Config I have two reCaptcha's

    One has nothing in it and is at the bottom of the page, the other has

    Attribute Grid Installed and
    Enable Contact Form

    but that is all.

    HELP!

    BigAl

  8. #8
    Join Date
    Feb 2009
    Posts
    2
    Plugin Contributions
    0

    Default Re: Add reCAPTCHa to Create Account Form

    I did everything as per the instructions, Can someone please tell me where the files Go>> into which folder, or it has it's new folder now (questionnaire), BUT under which directory.. admin or includes... I am not a software programing person!!

    Thanks

  9. #9
    Join Date
    Aug 2010
    Posts
    8
    Plugin Contributions
    0

    Default Re: Add reCAPTCHa to Create Account Form

    Quote Originally Posted by bsteinagel View Post
    Just an update for everyone: I figured everything out and all works perfectly now. If anyone should need help with installing reCAPTCHA on their website for either their contact us or create account forms, please let me know and I'll help you through it.
    Hi everybody and thank you for offering your help.

    I would like to install reCaptcha 1.1 to my contact us page in ZC 1.3.9h but cannot get it to run properly. I did upload the provided files as suggested and had to merge the header_php.php. After entering the codes in the admin section the reCaptcha panel is nicely shown. However, there is no validation of the code entered whatsoever. So any message sent (with or without validation or input) will go through. I figured out that is exactly what you were experiencing a while ago and described in another post.

    Still, I was not able to suffice in bringing this mod up and running.
    My testsite is q065sb.at/shop - is you are still willing to help, any input would be appreciated.

    I attach the files uploaded, if you will need them, I can also provide you with the keys.

    Thanks for your time and effort,
    greetings, Stevie
    Attached Files Attached Files

  10. #10
    Join Date
    Aug 2010
    Posts
    8
    Plugin Contributions
    0

    Default Re: Add reCAPTCHa to Create Account Form

    Well, I have something to add to my previous post.

    I tried to play around a bit and noticed the following. If one fills out all of the required fields (Full Name, Email Address and Message) BUT leaving the Security Check field blank the message is delivered with no notification being displayed.

    But if you leave any of the other fields blank as well, messages pop up. For example when not filling out any fields and sending the mail these 4 messages are displayed:

    1) Sorry, is your name correct? Our system requires a minimum of 2 characters. Please try again.
    2) Sorry, my system does not understand your email address. Please try again.
    3) Did you forget your message? We would like to hear from you. You can type your comments in the text area below.
    4) The Security Check code wasn't typed correctly. Try again.

    So here we have a situation in which the reCaptcha module is active. Now, when leaving any of the following blank - Full Name, Email Address or Message - but having properly or wrongly entered the reCaptcha code, JUST the corresponding messages are displayed. Yes, if the reCaptcha code is wrong here you get message 4, if it is correct, the message disappears. Hence, the module is just fine, even the code validation works!

    So my guess would be that there is a wrong closing in the php code which does not include validation of the reCaptcha code if 1-3 are correct. Hope this helps troubleshooting if anybody is willing to take a look at the files attached to the previous post.

    Any help is appreciated. Maybe somebody can pinpoint me in the right direction to help me look at the right file.

    Thanks a lot,
    greetings Stevie

 

 

Similar Threads

  1. Using two modules add extra fields and recaptcha to contact form
    By webmiss in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 22 Feb 2010, 07:43 PM
  2. Form Validator - Create Account Form
    By ftv in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 18 Feb 2009, 11:19 PM
  3. Add element to Create Account form
    By warstormer in forum Managing Customers and Orders
    Replies: 1
    Last Post: 4 Sep 2007, 02:45 PM

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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR