FORUMS


The Form Tools forums are no longer active, but the old posts have been archived here. Please see the Help page on how to get help / report issues.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Captcha undefined with or without the API
#1
Information 
After many days (last few and weeks ago's) of struggling with the recaptcha, I think it's a good idea to share my issues so others find something about it, at least until documentation is finished.

In brief:
1) Don't use functions using "recaptcha" in the name. They seem to have changed to "captcha"
2) There's no captcha for the POST version (direct-post to process.php withouth API).
3) Don't use the following out-dated links:


Whether you wanted to use RECAPTCHA in your form, Direct-post or API, you surely found some "UNDEFINED FUNCTION" errors if followed this link
http://docs.formtools.org/tutorials/post...page=index

The error is something like
Call to undefined function ft_api_start_sessions()

That page wanted to be a tutorial for adding recaptcha to a NON-API form, but it ends up taking you to the API version here http://docs.formtools.org/tutorials/post...ng_captcha
I don't know what happened along the way, but there are many attempts to do it but it never happened.

Later, if you decided to finally go with the API, it wont work if you used that link due to some update on the name of the function. So again, they will be undefined if copied from that page or from the overview of "function reference" here http://docs.formtools.org/api/?page=function_reference (page was fixed but the functions list still shows the wrong one)

The wrong functions I found (so far) are:
PHP Code:
<?php ft_api_display_[color=#FF0000]recaptcha[/color](); ?>
and
PHP Code:
<?php ft_api_display_post_form_[color=#FF0000]recaptha[/color]_error(); ?>

There is no good captcha or server-side validation tutorials yet (that I know).

Use the captcha demo for adding recaptcha to your forms using the API, found here:
http://demo.formtools.org/forms/captcha/

The outdated recaptcha tutorial mentioned above also has extra functions for the "thank you" page and error texts thrown by the captcha function that don't work either. I haven't found what the replacements are yet, if they are needed at all.

My apologies for my bad english. Fell free to edit it.
Reply
#2
Hi Sergio,

Thanks for the post! And I'm sorry for the problems you've been encountering! I'm the first to admit, the documentation is not always up to date.

I haven't fully gone through everything you've mentioned just yet, but one thing was probably worth mentioning right off the bat: it looks like you may not be running the latest version of the API. It was last updated on June 16 - earlier versions don't include the ft_api_start_sessions function that it's complaining about.

To upgrade, just click on your Settings -> Main tab and click the Check for Updates button. I'll check out the documentation right now.

- Ben
Reply
#3
Hi again,

I've just updated the user doc so that the function reference and other areas reference the valid function names; I *think* I've caught everything, but let me know if you spot anything else out of whack.

For the problems you listed, I think that using the latest version of the API should fix it. But of course, please post back if you have trouble.

- Ben
Reply
#4
Thank you for you response.

Excuse my english, but I don't know if that's fine, or it's me…
This page http://docs.formtools.org/tutorials/post...page=index
says
Quote:You can add submissions to Form Tools by two methods: the API or by directly posting your form to the process.php script. The second type is known as a POST form; this tutorial explains how to add a CAPTCHA to that form type.

and the first page after that, still takes you out of that, to the API version.
http://docs.formtools.org/tutorials/post...quirements

Are you still working on CAPTHAs for the non-API version?

Thanks.

PS: I figured out how to get it done, along with updating the code, but I can't get the variables loaded to the form after validation failed and just an empty form is shown.
Can you take a look at it and see if there is something missing at first sight?
http://forums.formtools.org/showthread.php?tid=196
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)