formtools / core

The Form Tools Core.
https://formtools.org
207 stars 78 forks source link

CAPTCHA not working correctly #223

Open JasonDamisch opened 6 years ago

JasonDamisch commented 6 years ago

I am trying to use your program Form Tools and it is giving me real troubles

After failing with the API, I am trying with the process.php way.

I got it working up to the point of trying to add the CAPTCHA. When I did, the CAPTCHA box shows up at the bottom of my form next to the Submit Button. But when I click on the CAPTCHA and it shows the checkbox indicating that I am a human, I then click on the Submit Button and I get the message

Sorry, the CAPTCHA (image verification) was entered incorrectly. Please try again.

So followed the instructions, and then tried to use the CAPTCHA and it is acting like I did not click on it when I click the Submit Button.

Please Help

benkeen commented 6 years ago

Hi @JasonDamisch, sorry you're having trouble! So you're following the instructions in this tutorial? https://docs.formtools.org/tutorials/post_form_captchas/

Is the form on the same website as Form Tools? If so, does one contain www. in the url and the other doesn't?

JasonDamisch commented 6 years ago

Yes I am trying to follow the instructions at the link you provided, the one for POST form. Yes the form is on the same website as my Form Tools installation.

Here are the URLs that I have https://dentivafreshbreath.com https://dentivafreshbreath.com/contact-us.php

In the HTML

In the back end

Form URL https://dentivafreshbreath.com/contact-us.php

Redirect URL https://dentivafreshbreath.com/thank-you.html

When I go to the Google reCAPTCHA site to look at my keypair, I see this message from them

"We detected that your site is not verifying reCAPTCHA solutions. This is required for the proper use of reCAPTCHA on your site. Please see our developer site for more information."

JasonDamisch commented 6 years ago

In the HTML in the form in an input tag with type="hidden"

name="form_tools_form_url" value="https://dentivafreshbreath.com/contact-us.php"

JasonDamisch commented 6 years ago

I may try to do the client side integration described on this page

https://www.google.com/recaptcha/admin#site/341423001

and maybe leave out some of the code that you said to put in, in your instructions.
I'll wait for further feedback before starting to experiment again

Jason

JasonDamisch commented 6 years ago

Next Step....

I try another script, which I purchased here...

https://www.freecontactform.com/responsive_form.php

I installed it here...

https://salesedrymouth.com/contactForm.htm

It has the exact same problem, script fails with the click in the box test for human thing. So, I opened up a trouble ticket with my hosting company.

Lets wait and see what happens.

Jason Damich

JasonDamisch commented 6 years ago

I have been trying with my hosting company for the last two days and I can't get much out of them except that we don't support 3rd party scripts. Do you have any suggestions?

benkeen commented 6 years ago

Hey @JasonDamisch,

I stepped through the tutorial just to re-check everything and I confess it does seem to be working as expected for me.

Did you include this line within your <form> and </form> tags?

<?php $api->displayCaptcha(); ?>

If not, move it within them (anywhere is fine) and try again. Failing that, try adding this line

print_r($_SESSION["form_tools_form_data"]);

to the the top of your page, then fill in your form, check the reCAPTCHA checkbox and resubmit. I'm curious to see what's in it after it takes you back to the same page.

JasonDamisch commented 6 years ago

I am sorry but I decided to go with another script. I am trying another program. One reason is that I don't really need a database with my Forms for this project although I am sure that other people will need to have a database with their Forms. Another reason is that I started to use another program and got too far along with it. I might get done in a few days.

Jason

Henleygraphics commented 5 years ago

Hi, I am having this exact same problem. I did everything you suggested earlier and the captcha response was. [g-recaptcha-response] => 03AOLTBLSoP3ox6W9cCBTgA03NcjoIAxWI2cZrZqcnQkqRLiBY8ymbeCFgCc93V6kjmuAij4-q_30oj9MVHvusJc8n4kv0LK5_E6QWKzwQ6QwGmsIp11bC3rlqNie0HGRii0N5okS95VepdXiXRYM8Uzc1g-QpxvKbUaNmQnWHsgm-sDxX3L5TWpnnXmkVr0FPt7dsOygRWv7cfCzRK_zbOGqoLO37rfP4ONhTSqPOt9AZYmhcOqRz8QCSTsepRo7zW3J6NCGAiUPuv6WGYVPnRUe8JkdZtUDDGZ7ulGRkRrr2bktOf1Cn9iIzJ095Mlp1xUnBdf9NwDE6 [Submit] => Submit [api_recaptcha_error] => Array ( [0] => invalid-json ) )

Form Tools Core Version: 3.0.14 Core Version Upgrade Track: 3.0.9 API Version: 2.0.0 PHP Version: 7.1.28 MySQL Version: 5.6.43 PHP Sessions: Available Suhosin Extension: Not Installed Curl Extension: Available SimpleXML Extension: Available


MODULES (name, version, enabled) Data Visualization, 2.1.2, Yes Export Manager, 3.0.6, Yes File Upload, 2.2.2, Yes Form Builder, 2.0.10, Yes Pages, 2.0.7, Yes Swift Mailer, 2.0.6, Yes System Check, 2.1.5, Yes TinyMCE Field, 2.0.8, Yes


THEMES (name, version, enabled) Classic Grey, 2.0.5, Yes Deep Blue, 2.0.3, Yes Default, 1.0.0, Yes