🎉 Celebrate with 10% OFF on All Products! Use Code: GFEX10 Or Buy Any 2+ Items for 30% OFF with Code: GFEX30!
Guides & Tutorials October 20, 2026

How to Add hCaptcha to Gravity Forms and Stop Form Spam

GravityExtra
How to Add hCaptcha to Gravity Forms and Stop Form Spam

Every public form attracts bots. A contact form starts collecting messages about cheap pills, a quote form fills up with nonsense, a registration form creates fake accounts, and a newsletter form signs up addresses that never asked for anything. Each of these entries costs time: somebody reads it, deletes it, or worse, answers it. Some bots also use forms to test stolen e-mail addresses or to send your notification e-mails to strangers, which can hurt your sender reputation.

hCaptcha is one of the most popular ways to stop this. It is a privacy-focused bot detection service with a free plan, a checkbox or invisible widget, and paid plans that challenge almost nobody. This guide shows how to add hCaptcha to Gravity Forms with the Gravity Forms hCaptcha Premium Add-on, how the check works behind the scenes, and how to set it up so real visitors barely notice it while bots are kept out.

The Gravity Forms form editor with an hCaptcha field added below the Message field and its Field Settings open on the right: field label hCaptcha, and the hCaptcha settings Mode Invisible, Theme Dark, Size Compact and Language French, with a note that invisible mode runs the check when the visitor submits
The hCaptcha field in the form editor: mode, theme, size and language per field.

Why a Server-Side Check Matters

A CAPTCHA widget on its own proves nothing. The widget runs in the visitor’s browser and hands over an answer token, but a bot can skip the page entirely and post straight to your form. What actually stops spam is the second half: your server takes the token, sends it to hCaptcha together with your secret key, and only saves the entry when hCaptcha confirms that the token is real, fresh, unused and was issued for your site key.

That is exactly what the add-on does on every submission. Tokens are single use and only valid for a short time, so a token copied from one submission is refused on the next. Because the add-on also sends your site key, a token solved on somebody else’s site is refused as well. And because the check happens before Gravity Forms saves anything, a refused submission never becomes an entry, never sends a notification and never reaches your CRM or e-mail tool.

Step 1: Get Your hCaptcha Keys

Create a free hCaptcha account, add your website under Sites and copy the site key. Then copy the secret from the account settings. In WordPress, go to Forms, Settings, hCaptcha and paste both. Before saving, the add-on asks hCaptcha whether the two keys belong together, so a typo or a key from another account is caught right away instead of on the first real submission.

The settings screen has a Test the keys button. On its own it checks the keys. Click Show the widget first, solve it and then test, and the add-on runs a complete check with a real answer, exactly like a visitor would, and shows where the widget was solved. It is a quick way to confirm that your server can reach hCaptcha before you rely on it.

Step 2: Decide What Happens When hCaptcha Is Down

Every online service can be slow or unreachable for a moment, and a good CAPTCHA integration has to decide what to do then. The add-on gives you the choice. Fail closed, the default, refuses the entry and asks the visitor to try again in a moment; nothing gets through unchecked. Fail open saves the entry anyway, marks it as not checked and adds a note explaining why, so a busy lead form never loses a real customer. Either way, a wrong or expired answer from the visitor is always refused, and the settings screen shows the last problem so you can spot a changed secret or a firewall rule.

You also choose how long to wait for hCaptcha, between two and thirty seconds, and whether the visitor’s IP address is sent along. hCaptcha recommends sending it, and Enterprise risk scores need it. Nothing else leaves your site: not a name, not an e-mail address, not a message. Only the secret, the answer token, the site key and optionally the IP address.

Step 3: Add the Field and Pick a Mode

Open your form and click hCaptcha in the Advanced Fields group. Place the field just above the submit button. In the field settings you choose how it looks and behaves.

  • Checkbox mode shows the familiar “I am human” box. Most people tick it and move on; hCaptcha shows a short image challenge only when something looks suspicious.
  • Invisible mode shows no box at all. When the visitor clicks Send, the check runs in the background and a challenge only appears when hCaptcha needs one. A short notice with links to the hCaptcha privacy policy and terms is shown instead, as hCaptcha requires.
  • Theme, size and language let the widget fit your design: light or dark, normal or compact for narrow sidebars, and the language of the visitor or one you pick.

If you are on a Pro or Enterprise plan, you can switch your site key to the passive or 99.9% passive mode in the hCaptcha dashboard. Almost no real visitor then sees a challenge, and the add-on needs no change at all.

Step 4: Let It Work With the Rest of Your Form

Small details decide whether a CAPTCHA feels smooth or annoying. Here is how the add-on handles the situations that usually go wrong.

A Contact form on the site after a submit with a missing message: Gravity Forms shows the error for the Message field, while the Spam check field shows the green box Verified by hCaptcha, so the visitor does not have to solve the check again
Another field had an error: the check stays verified, so the visitor only fixes the message.

An error in another field. The visitor forgets the message and submits. Gravity Forms shows the error, but the hCaptcha field now says Verified by hCaptcha. The visitor fixes the message and submits again without solving a second puzzle. Behind the scenes, the add-on gave the form a signed pass that can only be used once and expires after thirty minutes.

Multi-page forms. Put the field on the last page and the check runs on the final submit. Put it on the first page, which is a good way to stop bots before they reach a long form, and the check runs when the visitor clicks Next. The same signed pass carries the result to the last page, so hCaptcha is asked only once per entry.

AJAX forms and several forms on one page. Every hCaptcha field gets its own widget, AJAX forms keep working without page reloads, and only the form that was submitted is checked.

Save and Continue. Saving a draft never runs the check and never stores an hCaptcha answer. When the visitor comes back with the resume link, the field simply shows a fresh widget.

Other CAPTCHA fields. The hCaptcha script can pretend to be Google reCAPTCHA for compatibility. The add-on turns that off, so a Gravity Forms reCAPTCHA field on another form of the same page keeps talking to Google, and Cloudflare Turnstile keeps working too.

Step 5: Read the Result on Each Entry

Every entry that passed the check stores the result as entry meta, which you can add as a column in the entry list, filter by or export. Accounts on the Enterprise plan also receive a risk score with each check; higher means more likely malicious. Set a limit, for example 0.7, and entries at or above it are refused, while the score of every accepted entry is kept with it and written in a note together with the reasons hCaptcha gave. It is a simple way to see which of your forms attract the most suspicious traffic.

A Membership entry in Gravity Forms with the note from hCaptcha: passed, risk score 0.1 with the limit 0.7, reason safe, next to the entry fields name, e-mail and message
Every entry keeps the hCaptcha result; Enterprise risk scores are written as a note.

Tips for Fewer Challenges and Less Spam

  • Use invisible mode on short forms. Newsletter and contact forms convert better without a visible box.
  • Put the field on page one of long forms. Bots are stopped before they fill five pages.
  • Keep fail closed for forms that trigger e-mails or payments. Use fail open for lead forms where losing a real enquiry costs more than one spam entry.
  • Add your domain to the site key. hCaptcha only issues valid answers on the domains listed for the key.
  • Replace the test keys before going live. The published test keys always pass and give no protection.

hCaptcha and the Other Gravity Forms Spam Tools

Gravity Forms already has an anti-spam honeypot in the form settings, and it is worth keeping on. It catches the simplest bots for free and never bothers a visitor, because it is a hidden field that only a script fills in. hCaptcha adds the layer they cannot provide: proof that a human loaded your page and that the answer was issued for your site a moment ago. The two work well together. The honeypot quietly drops the dumbest bots, hCaptcha stops scripted and replayed submissions, and your notifications only go out for entries that passed both. If you also take payments, keep fraud rules on the payment side as well, because a CAPTCHA proves a person was there, not that the card belongs to them.

Frequently Asked Questions

Do I need a paid hCaptcha plan?

No. The free plan works with checkbox and invisible mode. Pro and Enterprise add passive modes, and Enterprise adds risk scores that the add-on can use.

Is any form data sent to hCaptcha?

No. Your server sends only the secret, the answer token, the site key and, if you allow it, the visitor’s IP address. The widget is loaded from hCaptcha in the browser, so mention hCaptcha in your privacy policy.

What happens if my licence expires?

Existing hCaptcha fields keep protecting your forms. You only need an active licence to add new hCaptcha fields.

Which versions are supported?

Gravity Forms 2.9 or newer with WordPress 6.5 and PHP 7.4 or newer. The add-on is tested with Gravity Forms 2.9 and 3.1.

Stop Form Spam With hCaptcha

Add an hCaptcha field to any Gravity Form, check every answer on your server, and keep the result with each entry.

0
0
Your Cart
Your cart is emptyReturn to Shop
🔥 FREQUENTLY BOUGHT TOGETHER
Complete Combo & Save 40%!
ITEM IN YOUR CART
Gravity Forms Klaviyo Add-on
$39.00/yr
+
🎁 RECOMMENDED ADD-ON SAVE 40% OFF
Original Price: $39.00/yr
Bundle Special Price: $23.40/yr