Forums

How to enable CAPTCHA in my forms?

nml375 26 Aug, 2009
Hi!
The simple Captcha is found under the Anti Spam tab. Select "Yes" under "Use Image verification", and add {imageverification} to your form where you'd like the Captcha-image and input to be placed. If you are using the Form Wizard, there should be a special Captcha field from the toolbox.

If, for some reason this Captcha does not work (your web server lacks support for the GD-library or such), then there's the ReCaptcha plugin you could use and enable. I'm not that familiar with the ReCaptcha plugin, but I recall there being several threads on this topic all throughout the forum.

/Fredrik
needshelp 09 Apr, 2010
Do you know what file you can edit to change the FormWizard Captcha item from the toolbox to {ReCaptcha} instead of {imageverification}?
needshelp 09 Apr, 2010
I figured it out to a certain extent. Please only do this is you are only going to be using ReCaptcha as image verification not if you are planning to use both default chronoengine and Recaptcha.

*Open CFElements.js located : /root/administrator/components/com_chronocontact/js/
edit line: 261 from {imageverification} to {ReCaptcha}
it should look like this:
/////////////////////////////////////////////// CAPTCHA
var CFCAPTCHA = new Class({
    initialize: function(style, size, name){
        this.text = '{ReCaptcha}';
    },
	createElement: function(){
		this.thecaptcha = new Element('span');
		this.thecaptcha.setText(this.text);
		return this.thecaptcha;
	}
});

*Open elements.php located: /root/administrator/components/com_chronocontact/themes/default/
delete lines from 133 - 140 and paste {ReCaptcha}. it should look like this
<!--start_cf_captcha-->
{ReCaptcha}
<!--end_cf_captcha-->

*now find {imageverification} and replace with {ReCaptcha} in the following files:
elements.php located: /root/administrator/components/com_chronocontact/wizardthemes/default
elements.php located : /root/administrator/components/com_chronocontact/theme1/

!!!!!
The only thing I have not figured out is how to change the text when you drag Captcha element from toolbox to your form area on the wizard, but after you save it and go back to it in the wizard you will see {ReCaptcha} in the element. Cheers!
GreyHead 09 Apr, 2010
Hi needhelp,

This is a lot of hard work. If you open the Form HTML box in the Form Editor you can just replace {imageverification} with {ReCaptcha}

Bob
needshelp 09 Apr, 2010
lol true, but i noticed the css that i have written or is pre-written makes the ReCaptcha box borken, this is why I stripped all the divs from it in one of the elements.php box. Ideally it would be great if you could drag the "Captcha" element from toolbox and it would have an option to use imageverification or ReCaptcha (with out any containers or different class for this specific container.).
GreyHead 09 Apr, 2010
Hi needshelp,

True, it's the pre-written CSS, you have to remove one or two of the surrounding divs (I forgot that). You can easily make a Wizard Custom Element though.

Bob
baxterdown 27 May, 2010
ReCaptcha is not working for me. Here's the default code from the HTML box surrounding {ReCaptcha}.

<div class="form_item">
  <div class="form_element cf_captcha">
    <label class="cf_label" style="width: 150px;">Enter these words:</label>
    <span>{ReCaptcha}</span> 
    
    </div>
  <div class="cfclear"> </div>
</div>


What do I need to edit?

Jose
GreyHead 27 May, 2010
Hi Jose,

That looks fine. Have you configured and enabled the ReCaptcha plugin?

Bob
GreyHead 27 May, 2010
Hi baxterdown,

You have to enable the plugin on the form Plugins tab (green bar is enabled).

Bob
baxterdown 27 May, 2010
Hi Bob, that was it! IT WORKS GREAT!!!!! Thanks so much! I'm going to implement it on all of our sites!!! :mrgreen:
annae 06 Jun, 2010

You have to enable the plugin on the form Plugins tab (green bar is enabled).

Bob



Hi, I’ve just spent half a day browsing the internet and this very forum and the answer has been right in front of my eyes! So simple. Thanks.
Anna
AussieSwede 04 Jul, 2010
My captcha is always the same as it was... How can I put random captcha?

Any help?
This topic is locked and no more replies can be posted.