Update October 20, 2017: I’m no longer going to be supporting nor updating this plugin because Infusionsoft now has native integration of Google’s reCaptcha in Infusionsoft web forms. I’m not really happy that this is forced on their users with no way to opt-out of it on a form (very soon), but it does mean this plugin is no longer needed.
Update (April 25, 2017): The latest round of spambot submissions on Infusionsoft forms can bypass any captcha, including Google’s reCaptcha. Also, they come from multiple IP addresses so Infusionsoft’s recent “spambot protection” they put in place is useless. All it does is block legitimate users from submitting your forms because it will show their ugly/difficult-to-read captcha in many cases when the submission is perfectly legitimate. Please see the full response I gave to Hon for more details. Other than doing custom scripting to block the submissions, you can also try to use a popup form where the form data loads from somewhere else (i.e. the info isn’t embedded on the same page the popup launches from). For example, if you are using a LeadBox from Lead Pages, you shouldn’t be getting spambot submissions on that particular form because the LeadBox actually loads from LeadPages and not your own site.
—– Original post begins now :) —–
I’ve talked about how “unfriendly” the built-in Infusionsoft® captcha is in previous posts (here and here). Those posts generated quite a bit of interest, so I knew there was definitely a need for a WordPress plugin to be developed.
That was where my dilemma was. I had never written a plugin before. So, once I had some free time (not easy to find when you’re busy with client work!), I dug my heels in and created my first plugin: GG InfuCaptcha!
You can see it in action on my contact page.
Want it for yourself? Download it directly from the WordPress.org plugin repository, then follow the installation instructions.
Once the plugin is installed, using it is very simple.
First, you will need to visit Google’s reCAPTCHA page and sign up for API keys. Click the “Get reCAPTCHA” button to get started. You’ll need to be logged into your Google account before you can sign up for your keys. Once you’re logged into your Google account and are on the reCAPTCHA admin page, fill out the section that says “Register a new site”:
Once you’ve done that, click on the name of the site you just created. you’ll see a section that says “Adding reCAPTCHA to your site”. Click the arrow next to “Keys” and you will see your Site key and Secret Key.
Open the GG InfuCaptcha settings and insert your Site key and Secret key into the appropriate fields, then save your settings.
That’s it for basic setup! Alternately, you can customize the color theme depending on whether you want a dark captcha or light captcha, and also customize the language (if you want to override the auto-detect) and customize the error message someone will receive if they don’t fill out the captcha.
At this point, you can start using the captcha in your Infusionsoft web forms. Simply insert your web form code (IMPORTANT: use ONLY the “HTML Code (unstyled)” version!) and add the Infucaptcha shortcode: [infucaptcha].
The reCAPTCHA should now show up on your web form once you publish your page or post. In addition, since Infusionsoft doesn’t natively have validation set up for embedded web forms, the InfuCaptcha plugin will add HTML5 validation to your form IF…
- You leave the “label” tags intact in the web form
- The text in the label tag includes an asterisk if the field is a required one
This won’t be a problem if you simply cut and paste the code from Infusionsoft exactly as it’s presented to you.
For Advanced Users
If you want to edit the HTML of the web form, but maintain the ability for the plugin to work, there are only two classes you MUST have in place for proper operation.
- The “infusion-form” class must be in place for the form element (or submitting the form after captcha validation won’t work)
- The “infusion-submit” class must be in place as a wrapper for your form button. (this is what is used to insert the captcha)
While I’ve done my own testing across multiple browsers, platforms, and WordPress installations, the plugin should still be considered BETA at this time of initial release. Please post a comment below should you run into any issues. If you need assistance with installation or setup, feel free to contact me for a quote to set up and install the plugin for you.
Comments 56
Great plugin! Anyway to make it required on submission? I noticed the forms are still submitting with this in place before they complete the captcha.
Hi Antonio ~
Are you talking about doing some sort of validation prior to submission? The captcha actually *does* submit prior to the web form. I know the button says “submitting”, but nothing is actually posted at that point. Instead, a background ajax request is sent to submit the recaptcha info for validation. If everything is good, the form is then submitted. If it’s not good (ie the captcha is not filled in), then I am having it respond with a message to fill it in. For each of these forms you are actually doing two form submits – one for the recaptcha and one for the Infusionsoft form.
Thanks for the quick reply! If you see here on this page we have implemented your plugin: http://www.antheahorvat.com/contact/
However if you hit submit without clicking the captcha it proceeds anyways with the form.
Followed the steps you laid out in the plugin instructions with no luck and the site is getting hit with a ton of spam inquiries.
Thanks for the help
Hmmm. I see what you mean. From looking at your code, it appears you have something else that is also inserting or doing something with the new recaptcha. I’m wondering if there is a conflict because of that. Can you disable the other plugin that inserts a recaptcha and try it again? Also, I’d like to confirm you have entered in your correct API keys. Finally, are you on PHP version 5.2+?
Actually, I see the issue. The class for your web form has been changed to “infusion-form-contact”. It has to remain as “infusion-form” or else the plugin won’t work. (See the FAQs for the plugin). Please update your class for your web form (or just ADD the “infusion-form” class to the form so you’ll now have both classes listed) and let me know if that fixes it.
I’m also trying this on our contact form on the website I listed in my reply, but when I hit submit to submit my contact request, it looks like it’s binding to the newsletter form in the footer instead (also an infusionsoft form). Is there a way for this to support multiple infusionsoft forms on one page or is there something else I’m doing wrong?
Hi Dustin,
Could you please let me know your URL where you are having the issue? Feel free to send me a message directly on my contact page if you prefer. I CAN tell you this is set up for a single form on a page, however I could look at getting you some code that will work for you if I can see the page. :) Thanks!
Sir I want to avoid that image gallery after clicking on checkbox instead of that just on clicked ,i want notification I am not robot i.e less challenge .Is this possible?
The challenge is set by Google. You only get the image gallery if you try the recaptcha over and over again. I’m guessing you didn’t get the image gallery the first time you tried out the captcha, but started getting it as you tested further. So, to answer your question, no, you can’t change it to less of a challenge.
Hi! just want to ask if the plugin supports DIVI theme’s text module? I’ve put in the codes in the text module, but the captcha is not displaying. However, code works when I place it in a page. Thanks!
Hi, could you please send me the URL of the page in question? (Please make it publicly accessible so I can see it). Put the shortcode in place in the text module so I can look at the code and see what’s happening. You can send the URL to me using my contact form if you need to keep it private.
I’m having issues getting the reCaptcha to show up in 2 areas: http://bit.ly/1puhaXv
1) When you click on the first Watch Webinar button under How to Increase Referrals
2) When you click on the blue button on the side labeled Ask Us a Question
When I check the source code, I see the g-recaptcha div inserted but it’s not showing up on the site itself. Oddly enough it works on other areas of the site (Contact page, on the home page in the slider when you click on the Start With A Free Strategy Session button).
Thanks for any assistance!
Hi,
I took a look at your page, and the only thing I can comment on is the /webinars/ page never finishes loading for me. The home page loads completely as does the contact page (the other places where you have the recaptcha). I’m guessing this is what the problem is. I don’t know what is hanging that page, but I would bet IF it would load fully, the recaptcha would appear.
Thank you for putting this plug in together! I’m just testing it out but I’m having an issue and thought you might know what to fix? I use WPBakery Visual Composer and when I add the shortcode into the text box with the unstyled html code from infusionsoft, it shows up okay but when submitting a response it does not go though, it will stay stuck on ‘Submitting…’ or the words disappear from the box but either way the submission does not go though. Here is a page I was testing it on : http://www.allproshadeconcepts.com/contact-us-2/
I even tried it on a page without using any Visual Composer, just plan text post and still having the same issue.
http://www.allproshadeconcepts.com/2608-2/
Thanks in advance!!
Hi Eric!
I took a look at your site and the first thing I noticed was the reCaptcha wasn’t on either of those pages. Then I checked to see what errors you might have, and I see your theme isn’t loading the jquery library. This is a normal library included in the WordPress core files, so you must have had a problem installing WordPress – part of it is missing in your install. Please re-install WordPress, then try again. If you see the reCaptcha on the page after you re-install WordPress, then you should have fixed it.
Hi there!
I’ve implemented your plugin on our site – here is the url: http://www.financialmarketingpros.com/contact-us
When testing, it seems to be stuck on validating the captcha when I click the checkbox. I’ve looked at other issues that others have described here on this page, but it seems like I’ve implemented everything correctly – any insight would be greatly appreciated!
Thanks!
Author
Hi Sophie,
I took a look at your page and it appears as though you are using the Thrive Visual Editor plugin. Since you used the builder to add in your Infusionsoft opt-in form, it is actually intercepting the form ajax submission and blocking my plugin from doing what it needs to do. (At least that’s what it appears is happening). I suggest you test by inserting the Infusionsoft form by itself on a test page that you are NOT using the page builder with (just insert the form “raw”), then see if it submits properly. If so, then you know it’s the Thrive Themes plugin that is interfering. Please let me know what you find. Thank you!
Thanks so much for the timely reply. I rebuilt the form using the regular WordPress text editor, instead of the Thrive Theme builder. It now verifies the capctcha checkbox, but does not submit the form. I clicked the checkbox, it verified, I clicked submit, and the button text changed to “submitting” then the button text goes away, and nothing happens. Do you think this is still a theme issue?
Thank you so much for all the help.
Author
Hi Sophie,
I did some testing, and from what I can see, what is causing the issue is the Google Site Key or the Secret Key is not correct. Can you please double-check your key pair in your Google account and make certain you copied/pasted them completely into the plugin settings?
jaime
Hi Jamie –
So sorry for such a delayed response I thought I had replied. I verified that the site and secret keys are configured correctly. If this is a theme issue, I’m not sure there’s much I can do! I would love to use your plugin as it integrates with our Infusionsoft forms beautifully without using the ugly and user unfriendly default captcha.
Thank you so much
Jaime!*** Apologies.
Hi GG,
Any chance to take a look at my situation?
I’m using plugin called “WPFront Notification Bar” which slides up from the bottom, for sign up with Infusionsoft back end. I place the [infucaptcha] shortcode as you said to do, but it doesn’t work.
http://www.carlloop.com
Author
Hi Carl, I looked at your site, but couldn’t find that the plugin was active. However, the reason it isn’t working is because you have changed the form code and removed some of the elements.
Please read the bottom of my post where I say…“For Advanced Users”. You’ll see what needs to be in place for the script to work. Make those fixes in your custom code and the plugin should work.
Hi GG,
I’ve implemented your plugin for the newsletter form at the bottom of this page (captcha shows up on form focus) – http://thinktank.swelldesign.com.au/INF44182/
Sadly my response from the ajax call to comes up empty :( Any Ideas?
Cheers
Author
Hi Madison,
You are running some other javascript that I believe is intercepting the captcha response in Infusionsoft forms upon submit. This is in your script.js file. I’m guessing you had this written previously and were using it before you tried my plugin? Or perhaps wanted something custom to go along with it? I’d suggest you remark out the section that is headed by “init infusionsoft modal forms to use appropriate bootstrap classes”, then see if the submit works.
Best,
Jaime
Thanks GG, I got to the root of the problem – when I cut and pasted my Secret in to the admin area I accidentally copied some extra text into this input field. The plugin works great thanks so much!
Author
Thanks for writing back with an update! Glad to see it all worked out.
Hey Geek Goddess would you have any idea of how to do this for a squarespace website?
Author
Adrian,
This is a WordPress plugin, so it wouldn’t work with squarespace. There are other manual methods for installing the Google reCaptcha, so it might be possible to do it on squarespace. I’ve never used squarespace before though, so I don’t know what is truly possible there.
Hi Geek Goddess,
We have implemented the Google Recaptcha into our InfusionSoft forms based on your instructions. Do we keep the InfusionSoft text captcha in ADDITION to the Google Recaptcha or do we REMOVE the InfusionSoft text captcha and just leave the Google Recaptcha on InfusionSoft forms?
Thanks!
Steve
Author
Hi Steve,
This is a replacement for the Infusionsoft captcha. Infusionsoft is not using the Google reCaptcha – they’re using their own captcha (which was always ugly and not very legible).
You can remove the Infusionsoft captcha and this one should automatically appear on your form (as long as you have everything set up correctly).
Thanks!
GG
Thank you very much, GG! The Google recaptcha looks better and is much more secure according to what I’ve read. We have been dealing with spambot form completions with I.S. captcha.
Author
I hope it works for you, Steve! Unfortunately all captchas work pretty much the same, so if you’ve still been getting spam even with the IFS captcha, then chances are you have been targeted by someone who is actually using real people to enter in their spam forms. One thing you can try is to see if the submissions are coming from the same IP address. If so, you can block that IP address by going to Admin-> Settings -> Application -> Form Security and entering the IP address there.
I had a client who was constantly targeted for spam and no matter what we did on the form, the spam kept coming through. It was obvious they were using real people to enter in the info, so what I finally did for them was to create an API web form so the script could check the submission fields before it went to Infusionsoft. There was a consistency in certain fields that were the spam submissions, so once I put that into place for them, the spam completely stopped.
Once again, I hope this fixes it for you.
Hi Geek Goddess!
I’ve added in the ReCaptcha to my IS form, which seems ok, displays properly.
It stops me submitting the form if it isnt completed, but if I then complete the Captcha after i’ve already failed it, the submit button is broken and it does not let me submit my form..
Page the recaptcha is installed is here: http://www.printscratchcards.com/scratch-card-samples/
Seems like it is failing even when the captcha is completed before attempting to submit as well.
Author
Hi Ben, I looked at that page, but the plugin isn’t installed there. From what I see, it should have worked, though. If it’s failing after the captcha is completing, perhaps you don’t have the correct site and secret keys installed? I wouldn’t be able to trouble-shoot without the plugin being active, so if you’d like me to do so, you’d have to reactivate it on your site.
Sorry! I ended up removing it before you had a chance to reply.. But i’ve just tried it again and generated some new keys and it seems to be working! :)
Does your plugin do this as well?
It’s telling the user to fill in any missing required fields on the same page!!! Instead of doing what our other infusionsoft forms usually do by redirecting to another page (which I hate).
So thank you!
Author
Hi Ben,
Glad to see it’s working now! And yes, the plugin adds in basic HTML5 validation to the form that forces the end-user to fill in fields that have an asterisk. :)
Thanks so much for posting a follow-up.
GG
Hello, so I’ve started to add your plugin to all of our forms but noticed that on one specific form after we have added in the recaptcha form the page redirects to the original infusionsoft form page and returns this message:
“There was 1 error:
This form is no longer accepting submissions.”
I’ve tried taking out the [infucaptcha] shortcode and the form submits as it should..
Any idea why this could be happening?
Also, on one other form the validation seems to be working on personal details fields such as name/email.
But we have a radio button and custom field for including a message which don’t seem to get picked up by the validation and again we get redirected to the plain infusionsoft page with the form.
Is this something you would be looking to fix?
Thanks
Ben
I love this plug in. Thank you so much for creating it and making such clear instructions. I adore infusionsoft and was so disappointed with their captcha! This plug in works exactly as detailed and is very easy to set up. We are working on the CSS to make google’s captcha a little prettier but even if we don’t work through that, this is a million times better than what Infusionsoft offers.
Thank you!
Hi Geek Goddess!
First of all thank you for such useful plugin.
I have installed the plugin and it was working fine. But I have two Infusionsoft forms on same page. Captcha only appearing for the first form and not in second form.
Kindly advise what I need to do.
Author
Hi Nowsath!
You can have more than one reCaptcha on a single page, but only with custom scripting. My plugin is set up for only a single instance of the captcha. This is because Google’s reCaptcha script requires a specific ID for the div where the captcha appears and you can’t have more than a single instance of an ID on any page (or if you DO, javascript won’t know which one to target so either you get duplication or you get one spot where things show up and then nowhere else).
If you’d like to try to set up the API scripting yourself (and not use a plugin), here is some relevant code to assist you in adding in multiple reCaptchas: http://stackoverflow.com/questions/1241947/how-do-i-show-multiple-recaptchas-on-a-single-page
Hi,
Just dropped in the plugin and seem to work except that I want to add a bit of space after the captcha before the button. I added the shortcode at the top of the form in a code block.
http://www.altadevices.com/contact/
Hi again
Nevermind, I just added a custom class with some margin.
Hi,
Great plugin but I can’t seem to get it working!
I’ve followed your instructions precisely but for some reason:
1) The reCaptcha box isn’t displaying
2) The button says ‘submitting…’ and doesn’t submit
Any ideas?
Thanks.
Author
I’ve sent you an email so I can trouble-shoot for you. :)
GG
Hi,
Sorry I gave you the wrong address so didn’t receive your email. I’ve corrected it now – could you please resend?
Hi,
Great work here,
We are, just recently, getting a lot a spams from our forms – so I would like to implement the Google reCaptcha.
The only thing with this solution is that it doesn’t work when javascript is disabled. Can the spam bot also bypass the javascript?
Cheers
Author
Hi,
Sorry to say that the latest round of spambots are actually scraping the sites and submitting the forms directly through Infusionsoft and NOT through your website – so nothing client-side (like javascript) you put on the website itself is going to protect you. You can tell this is happening by looking at a contact you know is spam, scrolling down to the bottom where you can see webforms are listed, and looking at the referrer URL. The spambot submissions will show the referrer is the actual Infusionsoft URL that the form gets posted to (it will start with your app name then end with a bunch of characters). Legitimate submissions from your website will show your WEBSITE URL there instead. I HAVE been able to get around the spambots for several of my clients and brought the spam submissions to zero, but it was only with custom programming using the API (or by not using the API, but still using custom scripting and making sure the “remove spambot protection” box was checked on that webform within Infusionsoft). Also, this latest round of spambots is using a botnet, meaning they are doing the spam submissions from many different IP addresses, so what Infusionsoft has implemented has no effect since it looks for multiple submissions from the same IP. Sadly, in my opinion, all Infusionsoft has done is make it more difficult for legitimate users to fill out forms.
Hi GG,
It seems to work beautifully, only I can’t get it centered in the form! Doh!
http://annedavin.merelkennedy.com/
Any suggestions?
Thanks!
Author
Hey Merel…
Try adding this to your CSS:
div.g-recaptcha div { margin: 0 auto; }
I thought I’d tried that first, but clearly my syntax was wrong somewhere! Thank you!
Author
Awesome! Glad to see it worked. Thanks for letting me know!
First of all thank you for posting. The plugin I am looking for my site [redacted] is the one you are having on your website. Could you please let me know what plugin are you using.???
Regards
Author
Hi, what plugin are you referring to? There is a link to the plugin referenced on this page in the post.