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

How to Add ALTCHA Spam Protection to Gravity Forms Without Cookies

GravityExtra
How to Add ALTCHA Spam Protection to Gravity Forms Without Cookies

Form spam is no longer a nuisance you can ignore. A contact form with no protection collects fake enquiries within days, and the usual cure, a picture puzzle, makes real visitors give up. There is a third way that sets no cookies, sends nothing to any other company and asks the visitor to do nothing: a proof-of-work check. This guide shows how to add one to Gravity Forms with ALTCHA, why it fits sites that care about GDPR, and what to set for forms of different kinds.

ALTCHA is an open-source project. Its widget asks your website for a small puzzle, the visitor’s browser solves it in the background, and your website checks the answer. We use it in the Gravity Forms ALTCHA Spam Protection Premium Add-on, which adds a native ALTCHA field to Gravity Forms and does all of the work on your own server.

Why form spam is so cheap for bots

A spam bot does not read your page. It finds the form, fills every box and posts it, thousands of times, for almost nothing. Every defence works by making that cheaper-to-send, harder-to-pass, or more costly. Hidden honeypot fields catch the simplest bots. Picture puzzles and traffic-light grids catch more, but they cost real visitors time, they are a poor experience for people who use screen readers, and the best-known services send visitor data to another company.

Proof of work attacks the economics instead. Each submission needs a small calculation. One visitor sending one form will never notice it. A bot sending ten thousand forms must do the calculation ten thousand times, and every answer works only once. The cost grows with the size of the attack and is close to zero for a human.

What proof of work looks like for a visitor

The visitor sees a small box with a checkbox, or nothing at all if you choose the floating display. While they fill in the form, their browser tries numbers until it finds the one that matches the puzzle. When it is done, the box says Verified. There is nothing to click in the default setup, nothing to read and nothing to type.

A Gravity Forms contact form with name, email and message fields and, below them, the ALTCHA box with a ticked checkbox that says Verified
The ALTCHA box in a form, after the browser solved the puzzle in the background.

Why this suits GDPR

The privacy case is simple because there is little to explain. The puzzle is made on your server, the widget script is served from your server and the answer is verified on your server. A page with the field makes no request to another host. The add-on and the widget set no cookies and use no local storage. No personal data is collected, and no IP address is saved with the answer.

That is not the same as a promise that you never need to think about privacy. The usual rules for the rest of your form still apply, and the optional request limit uses the IP address for one minute as a hash. But the check itself does not need a consent banner, because it does not store or read anything on the visitor’s device and does not pass data on.

Step 1: install the add-on

  1. Install and activate the Gravity Forms ALTCHA Spam Protection Premium Add-on next to Gravity Forms 2.9 or newer.
  2. Open Forms, Settings, ALTCHA and enter your license key.
  3. Make sure the site uses HTTPS. The widget needs the Web Crypto API, which browsers only offer on HTTPS pages. The settings page warns you if it is missing.

There is no account to create and no key to copy. A private secret is made when the add-on is activated and never leaves your server.

Step 2: add the ALTCHA field

In the form editor open Advanced Fields and add ALTCHA. Place it above the Send button. For a multi-page form put it on the last page. Each form can have one.

Step 3: choose when it starts and how it looks

The field has four start modes. As soon as the page loads is the default and gives the quickest result, which is right for short contact forms. When the visitor starts filling in the form avoids work on pages that many visitors only read. When the visitor sends the form and When the visitor clicks the box are for cases where you want the check to happen later.

There are three displays. Standard puts the box in the form. Floating shows it next to the Send button only when it is needed. Overlay opens the check over the page when the visitor sends the form. You can also change the language, write your own texts and hide the footer line and the logo.

Step 4: set the complexity

Complexity is the highest number of tries the browser may need. Light allows up to 50,000 tries, standard up to 250,000 and strong up to 1,000,000. The right number is a balance: a harder puzzle costs bots more, but it also keeps a visitor with an old phone waiting a little longer. Standard is a sound default for contact forms. Use strong for forms that attract attackers, such as account sign-ups and quote requests, and light for a newsletter box at the bottom of a page.

The ALTCHA settings page in Gravity Forms: complexity, custom maxnumber, challenge lifetime, request limit and entry note
How hard the puzzle is, how long it lives and how often one visitor may ask for it.

Two other settings protect the check itself. The challenge lifetime decides how long a puzzle stays valid; the widget fetches a new one on its own when needed. The request limit stops one visitor from asking for thousands of puzzles in a minute.

Step 5: test it

Open the Test section of the settings page and press the first button. The add-on makes a puzzle, solves it, verifies it and uses it once. Then it confirms that a second use of the same answer is refused, that an answer with a forged signature is refused, that an answer signed with another secret is refused and that an expired puzzle is refused. It also asks the challenge address from your browser and checks that the answer is marked never to be cached. The second button runs the real widget on the page and sends its answer to the server.

What happens behind the scenes

When the page loads, the widget requests a puzzle from a small route of the add-on. The server picks a random salt and adds three things to it: when the puzzle expires, which form it belongs to and the highest number the browser may try. It joins the salt with a secret number, hashes the result with SHA-256 and signs the hash with HMAC-SHA256 and the private secret. The browser receives the salt, the hash and the signature, but not the number.

The browser finds the number by trying them one by one. It sends back the number with the rest. The server recalculates the hash, checks the signature, checks that the puzzle has not expired and belongs to this form, and checks that the number is not above the limit. Then it records the answer as used. The record is one small row that lives until the puzzle would have expired anyway and is removed by an hourly clean-up.

This gives the checks that matter. A forged answer fails the signature. A tampered expiry or form number changes the hash and fails the signature. An expired answer is refused. An answer made for another form is refused. An answer sent twice, even at the same moment, is accepted once.

Works with the way you build forms

  • AJAX forms send without a page reload. The widget waits for an unfinished check, and if another field is refused the visitor can fix it and send again.
  • Multi-page forms are checked on the final send, so moving between pages never uses up the answer.
  • Save and Continue needs no check to save, and the resume link opens the form with a fresh widget.
  • Page caching is safe because the page holds only the address of the challenge route. The browser fetches a fresh puzzle on every visit, and the route forbids caching.
  • Several forms on one page each get their own widget and their own puzzle.

Watching it work

The settings page keeps statistics: how many checks were verified, how many failed, why they failed and the last days. A burst of already-used or no-answer failures tells you that bots are hitting the form with replayed or empty submissions. Every saved entry also records that it was verified, which you can see in the Entry box and use as an entry list column.

The ALTCHA line in the Entry box of a Gravity Forms entry showing that the check was verified with a short challenge id
The entry screen records that the check was verified.

Honest limits

Proof of work raises the cost of spam, it does not identify people. A determined attacker with real computing power can pay the cost, and a person typing spam by hand passes like any visitor. It is a strong first layer, and it works best with the other protections you already have: a honeypot, sensible rate limits and, for sensitive forms, a review step. It also needs a modern browser with the Web Crypto API on an HTTPS page.

Quick checklist

  1. The site uses HTTPS.
  2. The add-on is active with a valid license key.
  3. The ALTCHA field is on the last page of every multi-page form.
  4. The Test section shows every line passed.
  5. The challenge route is excluded from any cache you control.
  6. A strict Content Security Policy allows worker-src blob:.

ALTCHA gives Gravity Forms a spam check that costs visitors almost nothing, costs bots a lot and keeps all the data on your own server. Add the field, press Test and send a form to see it work.

Get the Gravity Forms ALTCHA Spam Protection Premium Add-on

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