Forums

reCaptcha plugin

hi-tech 14 Apr, 2009
Hi,

Question on the reCaptcha plugin ChronoForms_V3.1_RC4.11.

I have the plugin enabled for the contact form, however I cant get the actually widget to display on the page. I dont see an option to insert the reCaptcha widget in the form. I know its enabled as when I click submit it returns an invalid response from the reCaptcha servers... What step am I missing?

Thanks!
GreyHead 14 Apr, 2009
Hi hi-tech,

Sorry, I missed a critical instruction. Add {ReCaptcha} to your Form HTML where you want the ReCaptcha box to show up.

Bob
hi-tech 14 Apr, 2009
Great, thanks.

I had since reverted to the manual install using your script from an older thread and disabling the new plugin.

I'll give the plugin another try now. Thanks!
hi-tech 14 Apr, 2009
Works nice thanks! Onto further testing...

One more question, I have the "try to republish" option set. I notice this also fills the reCaptcha field with the old data, which I think somehow affects validation (always fails) unless you click the "refresh" icon inside the Captcha widget. Is their a way to get the "try to republish" option to skip the reCaptcha widget fields?
GreyHead 14 Apr, 2009
Hi hi-tech,

Hmm . . . no obvious answer to this. Maybe a JavaScript snippet to set the field value to null onFocus?

Bob
hi-tech 14 Apr, 2009
Hi, that could possibly work unless the viewer tabs away from the widget before clicking submit?

One more question for you:

I have the mambot installed/enabled. Is it fully compatible with RC4.11? (the plugin file I downloaded had 4.11 in the zip file name).

Reason I ask is once i insert the {chronocontact}formname{/chronocontact} in an article (using TinyMCE 2.0) the entire page breaks with a single php line error for that index php file for that page:

Fatal error: Call to undefined method stdClass::get() in [path to webhost]/components/com_content/views/article/view.html.php on line 121 


line 121:
 $document->setTitle( $params->get( 'page_title' ) );


The form displays fine with all other methods (mod_chrom, menu etc...)
cstanko 22 May, 2009

Works nice thanks! Onto further testing...

One more question, I have the "try to republish" option set. I notice this also fills the reCaptcha field with the old data, which I think somehow affects validation (always fails) unless you click the "refresh" icon inside the Captcha widget. Is their a way to get the "try to republish" option to skip the reCaptcha widget fields?



Hi Hi-Tech,
pardon my stutter😉 I have witnessed the same behavior. I didn't really spent any time analyzing the cause of the problem but here is a simple hack.

Open wwwroot\compontents\com_chronocontact\plugins\cf_recaptcha.php

First:
on line 243 enter
<input type='hidden' id='beep' name='beep' value='1'/>
after the closing quote.

Second:
on line 294 enter
<script type="text/javascript">if ($("beep")) { window.addEvent("load", function() { Recaptcha.reload(); }); }</script>
right after
</noscript>
.

Done!

What this does is trigger the reload function of the recaptcha once the page is fully loaded (and all fields have been filled), which you discovered solves the problem. I admit somewhat lame, but appears to work well. An added benefit is that the reload sets focus to the captcha field. Hope it'll do.

Cheers,
Chris
Max_admin 24 May, 2009
Hi Chris,

Thanks for posting this nice solution, I think the best is to provide some skip list of fields for the republish, I will add this to the next release!

Regards
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.