Hi,
I would love to know how to integrate chronoforms with recaptcha.
best regards,
Tommy, Sweden.
I would love to know how to integrate chronoforms with recaptcha.
best regards,
Tommy, Sweden.
Hi Tommy,
It wouldn't be too difficult I think. You'd need to do quite a bit of hacking though.
Bob
PS See http://recaptcha.net/plugins/php/
It wouldn't be too difficult I think. You'd need to do quite a bit of hacking though.
Bob
PS See http://recaptcha.net/plugins/php/
If anyone has figured out the code modifications which need to be done to use recaptcha, I would be interested in seeing them here...
I would like to try it out, but don't have the time to spend hacking around right now. So if anyone else has already done it and doesn't mind sharing, that would be great!
I would like to try it out, but don't have the time to spend hacking around right now. So if anyone else has already done it and doesn't mind sharing, that would be great!
Seconded! This would be incredibly useful, for ChronoForms as a product and us as users.
I'm happy to have a go and will post my findings / instructions here if I get things to work, if someone could point me at the right file(s) to start looking at within ChronoForms please?
Thanks,
Steve
I'm happy to have a go and will post my findings / instructions here if I get things to work, if someone could point me at the right file(s) to start looking at within ChronoForms please?
Thanks,
Steve
Hi steve, johnny and all,
I have reCaptcha working in ChronoForms - here's a test form, try as much as you like the form just submits and re-displays.
It's a bit of a mess so I'll clean the code up and then post it here. No core code hacks required.
Bob
PS It's on my site because the reCaptcha key is domain specific.
PPS I think it could be put in a ChronoForms PlugIn but that does need a core hack to let the Plugn run both on load and submit.
I have reCaptcha working in ChronoForms - here's a test form, try as much as you like the form just submits and re-displays.
It's a bit of a mess so I'll clean the code up and then post it here. No core code hacks required.
Bob
PS It's on my site because the reCaptcha key is domain specific.
PPS I think it could be put in a ChronoForms PlugIn but that does need a core hack to let the Plugn run both on load and submit.
Hi all,
To use reCapcha with ChronoForms[list]Sign up for reCaptcha and get Public and Private keys for your domain Unzip and copy the attached chrono_recaptchalib.php file into your components/com_chronocontact folder Add this code to your Form HTML where you want the reCaptcha to appear Go to the Validation Tab for your Form and enable Server Side Validation. Enter this code in the ServerSide Validation Code box Make sure that you have the correct reCaptcha key in each code block [/list]
Bob
PS The chrono_recaptchalib.zip has some added Joomla protection and some un-needed code striped out.
To use reCapcha with ChronoForms[list]
<?php
include_once(JPATH_COMPONENT_SITE.DS.'chrono_recaptchalib.php');
// you got this from the signup page
$publickey = "###~~your public key~~###";
echo "<div style='width:312px; height:125px;'>".recaptcha_get_html($publickey)."</div>";
?>
<?php
include_once(JPATH_COMPONENT_SITE.DS.'chrono_recaptchalib.php');
$privatekey = "###~~your private key~~###";
$resp = recaptcha_check_answer (
$privatekey,
$_SERVER["REMOTE_ADDR"],
JRequest::getVar("recaptcha_challenge_field"),
JRequest::getVar("recaptcha_response_field") );
if ( !$resp->is_valid ) {
return "The reCAPTCHA wasn't entered correctly. Go back and try it again<br />
(reCAPTCHA said: ".$resp->error.")";
}
?>
Bob
PS The chrono_recaptchalib.zip has some added Joomla protection and some un-needed code striped out.
Hi Bob,
Thank you very much for posting this great tutorial🙂 I will copy it to the hacks forums and will add it to the next release or the next one!
Best rgeards,
Max
Thank you very much for posting this great tutorial🙂 I will copy it to the hacks forums and will add it to the next release or the next one!
Best rgeards,
Max
Hi greyhead and max,
I need your help, I followed the above instructions and pasted this code in my form html, but the page breaks... any idea??
html code: <?php
include_once(JPATH_COMPONENT_SITE.DS.'chrono_recaptchalib.php');
// you got this from the signup page
$publickey = "using my public key";
echo "<div style='width:312px; height:125px;'>".recaptcha_get_html($publickey)."</div>";
?>
Settings: serverside validation: ON
spam image verification: OFF
Recaptcha plugin enabled: True
I need your help, I followed the above instructions and pasted this code in my form html, but the page breaks... any idea??
html code: <?php
include_once(JPATH_COMPONENT_SITE.DS.'chrono_recaptchalib.php');
// you got this from the signup page
$publickey = "using my public key";
echo "<div style='width:312px; height:125px;'>".recaptcha_get_html($publickey)."</div>";
?>
Settings: serverside validation: ON
spam image verification: OFF
Recaptcha plugin enabled: True
This topic is locked and no more replies can be posted.