Skip to content

WordPress form CAPTCHA

Contact, quote and newsletter forms are often open to bots. One shortcode puts a BotBlocker check inside the form, with no second captcha plugin to maintain.

Form CAPTCHA add-on in BotBlocker Security

The forms nobody protects

WordPress form captcha covers the pages that core never guards: contact, quote, callback and sign-up forms.

The forms core never guards

Core WordPress protects its login and its comments. Everything else is a theme template that posts to a handler and hopes for the best. A contact form with a name, an email and a message field is an open relay for anyone who wants to send mail from your domain.

A newsletter box is worse in one way. A bot that subscribes hundreds of invented addresses turns a clean list into a delivery problem, and the cleanup lands on whoever manages the mailing.

WordPress form captcha closes the gap with one shortcode placed inside the form. The visitor sees a small widget, the handler sees a signed answer, and a submission without one is refused.

Three challenges, one widget

I am not a robot

One click. It is the default for any shortcode that does not name a type, and the least intrusive of the three.

Pick the colour

The widget names a colour and the visitor clicks it. Cheap for a person, awkward for a script that guesses.

Hold the button

Press and release inside the green zone. The timing and the pointer path are part of the answer, not just the final state.

Why a copied answer does not work

The answer is signed and bound to the connection that produced it: address, browser string and session cookie. If any of the three changes between the widget loading and the form posting, the answer stops being valid.

That closes the replay case, where a solved challenge is pasted into another browser or sold as a token. It also means the widget and the form have to live on the same page, in the same visit.

If the answer is absent or invalid, the form is refused and your failure message appears. A valid answer hands the request to the form handler, which does its usual work: validation, storage, email.

The four ways a working form breaks

A cached page is the first. The widget carries state, and a stored copy can show one visitor the challenge of another. Exclude those pages from the cache, or keep a cache that only serves verified visitors.

The second is placement. A shortcode outside the form element renders, but it has nothing to protect. Keep it inside the tags, before the submit button.

The third is a second widget on the same form. Two challenges produce two answers, and the check expects one. The fourth is a theme that overwrites button styles, which looks broken but still works; a custom class on the widget is enough to restyle it without editing the add-on.

Settings worth setting once

Default type

Set the challenge you want everywhere, then override it on a single shortcode when a form needs something else.

Light or dark

The widget theme follows your design. A shortcode attribute overrides the default for one form.

Your own class

A class attribute wraps the widget, so spacing and borders come from your stylesheet instead of inline rules.

A failure message

One short sentence tells the visitor what to do next. Keep it calm and specific, and it also helps a person caught by mistake.

One of hundreds of BotBlocker capabilities

This add-on covers one job. The core plugin brings the firewall, the visitor check, the login rules and the log; PRO features extend them further. Install BotBlocker, turn on what your site needs and leave the rest off.

BotBlocker protection shield

Questions about the form widget

Does it protect every form automatically?
No. It protects the forms where you place the shortcode. A public form without it stays open, so add it to each one you care about.
Will a cached page reject every submission?
It can. Exclude pages with the widget from page caching, or use a cache that serves stored pages to verified visitors only.
Can a visitor with cookies blocked pass?
No. The challenge needs a session cookie to bind the answer. If a real reader reports a loop, check the browser settings first.
Why is the widget unstyled?
Your theme probably overrides button styles. Use the class attribute, then restyle the widget from your own CSS.
Do I still need comment protection?
Yes. This widget covers custom forms. Comments and login have their own checks, and text scoring covers what reaches the queue.