x

How to beef up your contact forms with Google reCAPTCHA!

For about a month and a half I tolerated daily spam submissions through my website's contact form (about 6 spam submissions per day). Weebly's option to add CAPTCHA just didn't work, so I decided to do it myself. Here's how you too can stop unwanted bots from filling out your forms!

Step 1: Add a form to your website (I assume that you probably already have a form). In the form options turn on Google Captcha. If Weebly's Captcha option is not turned on, bots will be able to submit the form without having to verify their humanity.

Step 2: Visit https://www.google.com/recaptcha and follow the instructions. For the label, name it something like "Contact Form" and for the type of CAPTCHA choose reCAPTCHA V2.

Step 3: Click register. On the next page you should see a lot of information. The information you want to grab is under the label "Client side integration."

This goes in your header code:

<script src='https://www.google.com/recaptcha/api.js'></script> 

This goes into your contact form using the Embed Code widget:

<div class="g-recaptcha" data-sitekey="YOUR_KEY_GOES_HERE"></div>

imageDrag and drop the Embed Code widget into your contact form. Paste your reCAPTCHA code into this widget.

Hit save.

Hit publish.

And that's all there is to it! Enjoy a spam-free existence!

11,057件の閲覧回数
メッセージ1/23
不適切なコンテンツを報告
22 返信
Square

Thanks for sharing!

2,015件の閲覧回数
メッセージ24/23
不適切なコンテンツを報告

@MonicaP, now that Weebly provides a Google Captcha option, there's no need to embed any HTML code into the contact form. For step-by-step instructions on how to test Google Captcha on Weebly, please follow this link:
https://blog.ivertech.com/blog/how-to-add-recaptcha-to-weebly-contact-form

It’s tricky trying to test the Google Captcha feature as the challenge question is only displayed AFTER you click on the the “submit” button. Also, you will need to clear your cookie or use an incognito window in order for the Captcha feature to kick in. There will be no “I’m not a robot” checkbox at all!

1,398件の閲覧回数
メッセージ24/23
不適切なコンテンツを報告