A contact form on a public website starts getting spam within days. The usual fix is a puzzle: pick the traffic lights, type the wobbly letters. That stops some bots and annoys every real customer. The forms I build stop spam in three quiet layers instead.
1. A field only bots fill in
The form has an extra field that people never see. It's hidden on screen and screen readers skip it, but simple bots fill in every field they find. If it comes back filled in, the enquiry is dropped.
The bot is still told it worked. If it got an error, it would learn to skip that field next time. Here's the check on this site:
const { fax, ...enquiry } = parsed.data
// Honeypot filled: pretend it worked so the bot learns nothing.
if (fax) return { ok: true }2. A check that runs in the background
Next, Cloudflare Turnstile looks at signals from the visitor's browser and decides whether a person is there. Most people never notice it. When it isn't sure, it asks for a single tick in a box, not a picture puzzle. The server confirms the result with Cloudflare before saving anything.
3. A limit on how often
Finally, each connection can send five enquiries an hour. A real visitor sends one, maybe two after spotting a typo. Anything past that gets a short message pointing to the email address instead.
What you get
Enquiries in your inbox that came from people, and a form that stays as quick to fill in as it looks.