About This Ticket

Getting spam, adding google recaptcha

by ACallander / September 26, 2014, 8:40 pm

So I'm still getting spam after adding the google recaptcha API how do I include this into the "valid" so that the user has to enter it in and can't bypass it like it is now. I've added the "_valid" and "required" like so:


<input type="hidden" name="_valid[name]" value="required">


The "name" bit in "_valid[name]" needs to contain the name of the captcha input field. I hope that makes sense?

Weird I've tried multiple names of the captcha input and it still won't work.


I attached the file.. it's at the bottom:





I guess someting went wrong with the file upload, as I can't see anything here. Anyways, could you please provide me with the URL to your form? Thanks!

The url is treetop-studios.com (at the bottom, contact)



I just had a look at your form, and the field name of your captcha is "recaptcha_response_field", so you'll need to add a hidden required field which would look something like: 

<input type="hiden" name="_valid[recaptcha_response_field]" value="required">

I reckon that would do the trick.

Weird added that line and even the 

<input type="hidden" name="_valid[recaptcha_challenge_field]" value="required">

Still sends without using captcha.


I just had a look at your form markup, and it appears the hidden field is placed withing <noscript> tags for some reason. So this field is only applied when Javascript is turned off. Please have a look at the markup below (this is a direct copy&paste from your site):

                                  <iframe src="http://www.google.com/recaptcha/api/noscript?k=6Le0lPgSAAAAAGQjTu12nyi9zIrrQvPLu3fcX7fE"
                                  height="300" width="650" frameborder="0"></iframe><br>
                                  <textarea name="recaptcha_challenge_field" rows="3" cols="40" value="required">
                                  <input type="hidden" name="_valid[recaptcha_response_field]" value="required">

Please make sure the hidden field is placed outside the <noscript> tags and you should be fine.


Hi there!

Have you been able to get this working now?


Closed due to inactivity