+ Start a Discussion
Thomas RandellThomas Randell 

Web-to-Lead form not working with recaptcha

I'm trying to enable spam filtering on a Web-to-Lead form using the Create a Web-to-Lead Form.

This was quite tricky to start with because the pop-up to add an API Key Pair disappears if you click away from it! I managed to manually enter the secret as it was impossible to copy and paste it. Then I made a typo and found it was impossible to edit the key, as the page for editing keys is broken. The only way was to delete the key and add it again through the disappearing pop-up. 

Now I've included the form in our site, but the recaptcha does nothing - if I ignore and click submit, the form submits to https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8 anyway which is just a blank page. 

I know this is new functionality but it doesn't seem like it is working at all?
Missy LongshoreMissy Longshore
Hi Thomas, I just answered this question for Cynthia as well, so you're definitely not the only one experiencing this problem! Please check out my reply to her there, then I suggest you or her post an idea to the idea exchange ASAP so Salesforce knows this is an issue and we can help you to garner support! Best of luck, Missy
Missy LongshoreMissy Longshore
Here's the link to the other question about reCAPTCHA not really working: https://developer.salesforce.com/forums/ForumsMain?id=9060G000000I6MHQA0 
Lori StippLori Stipp
Thomas, I encountered the same problem. I agree the UI for entering an API Key Pair needs work. :)

Here's how I solved the problem of detecting whether the reCAPTCHA worked before allowing the user to click Submit.  Hope this helps.

Trace GillespieTrace Gillespie

I cannot get this to work either. I am developing this is in a sandbox, but I have added the URL to the domain list in my

I have been following all of the opnline tutorials, reCaptcha is configured and performs correctly (I think) however the lead will not save.  

When I turn the form's debug mode on, I get this at the top and bottom on the results:

ALERT: Captcha Results: 'No Captcha Keys Found' 

validated-captcha: Pair(false,No Captcha Keys Found)

I have the API Site and Secret Keys created and have double checked them.

I can't find any documentation on these error messages or a a possible cause. Please help!

Aaron Bailey 5Aaron Bailey 5
Thank you to Lori for a solution that worked for a while. However, validating client-side isn't secure and there are bots dumping spam into our Org again. I think the bot is simply populating the response variable, allowing the button to be enabled and clicked again. Or perhaps the bot is skipping that altogether and invoking a click event without the button being enabled. Either way, Salesforce NEEDS to solve this problem so that we can validate against the server.