The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
![]() |
easy solution for Captcha without the API - Formtools v2.X - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1) +--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5) +--- Thread: easy solution for Captcha without the API - Formtools v2.X (/showthread.php?tid=2306) Pages:
1
2
|
easy solution for Captcha without the API - Formtools v2.X - Tzvook - Dec 2nd, 2012 I have been using formtools for a few years now. Since I saw lots of requests for using a Captcha without the API ( tested under Formtools version v2.0.2 , should fit the whole 2.x branch) I decided to contribute this easy solution to this nice community. So I dedicated a few minutes to clean the Hebrew from it and turn it into English for you to use ..... with my peace blessings from Israel :-) First of all go to http://www.phpcaptcha.org/ and download the "Securimage" files. put the files under the main formtools directory (formtools/securimage/) open your formtools/process.php , save it under a new name - lets say "processC.php" - it will be used for all your captcha-enabled forms. NOW edit the file ("processC.php"): the first line: Code: <?php should turn into: Code: <?php around line 100 - AFTER these lines Code: // do we have a form for this id? ADD THE CODE: Code: // Tzvook captcha Your forms need to go to the new file: something like - <form action="http://www.your-domain.com/formtools/processC.php" method="post"> and the captcha itself, wherever you need it in your form: Code: <img id="captcha" src="http://www.your-domain.com/formtools/securimage/securimage_show.php" alt="CAPTCHA Image" alt="Security Image" style="padding-left: 4px;" align="right" /> There are a lot of nice features @ http://www.phpcaptcha.org/ ... all those can be inserted in your forms ... I simply gave the easiest implementation ... It's a quick solution - I just made it and didn't had too many tests - but it seems to work perfectly, I'll be glad to hear if you had issues with it .. .. RE: easy solution for Captcha without the API - Formtools v2.X - bills - Dec 19th, 2012 Thanks! I struggled with the API and was unsuccessful. This works great. RE: easy solution for Captcha without the API - Formtools v2.X - Tzvook - Jan 12th, 2013 :-) glad to hear .... If there were no comment, it probably works as expected for all ... RE: easy solution for Captcha without the API - Formtools v2.X - Joe - Jan 16th, 2013 Awesome! Thanks for sharing with our community! RE: easy solution for Captcha without the API - Formtools v2.X - moorezilla - Jan 30th, 2013 Thanks for adding this! Just a note, but I think that this: ft_display_page("../../global/smarty/messages.tpl", $page_vars); should be changed to something like ft_display_page("error.tpl", $page_vars); I don't think ../../global/smarty/messages.tpl exists... at least I didn't see it on my install. RE: easy solution for Captcha without the API - Formtools v2.X - seanmcd51 - Mar 11th, 2013 I'm having trouble making it work. For some reason I was able to get through the form setup process fine but now the captcha won't verify the image. Here is my form: http://www.imnotaclown.com/library/ I tried making the changes as moorezilla suggested but that didn't seem to work either. Suggestions? Thank you. (Jan 30th, 2013, 10:49 AM)moorezilla Wrote: Thanks for adding this! RE: easy solution for Captcha without the API - Formtools v2.X - RetroWill - May 3rd, 2013 Is there any way to have the error page a custom one of your own? RE: easy solution for Captcha without the API - Formtools v2.X - leeburstroghm - Jan 21st, 2015 yes, still pretty much correct as of today, BEST solution yet! RE: easy solution for Captcha without the API - Formtools v2.X - kan - Jan 24th, 2016 Hi, can someone help me, and explain me where I can set the action on the form? When I look in the formbuilder/published directory and have a look in the code of my form there is no <form action...> Your forms need to go to the new file: something like - <form action="http://www.your-domain.com/formtools/processC.php" method="post"> and also, how can I add the below catcha code to forms built with formbuilder? and the captcha itself, wherever you need it in your form: Code: <img id="captcha" src="http://www.your-domain.com/formtools/securimage/securimage_show.php" alt="CAPTCHA Image" alt="Security Image" style="padding-left: 4px;" align="right" /> <font size="1">copy the code to the field:</font><br /> <input type="text" name="captcha_code" size="10" maxlength="6" /> <a href="#" onclick="document.getElementById('captcha').src = 'http://www.your-domain.com/formtools/securimage/securimage_show.php?' + Math.random(); return false">[ Different Image ]</a> thanks in advance, Kan RE: easy solution for Captcha without the API - Formtools v2.X - Oldie - Aug 24th, 2016 Hi Kan, did you or anyone else figure out how to get the captcha to work on the form? I try pasting the code but it never works. |