Does your contact form confirm and protect submissions?

A contact form is often the only bridge between an interested visitor and your business. If it's confusing, silently fails, or drowns you in spam, that bridge collapses. Getting it right is mostly about clarity, feedback, and a little spam defense.

Keep it short and clear

Ask for the minimum: name, email, message. Every extra field lowers completion. Label fields clearly (placeholders alone aren't labels), mark which are required, and use correct input types so mobile keyboards adapt:

<label for="email">Your email</label>
<input type="email" id="email" name="email" required autocomplete="email">

Validate on the server, always

Client-side validation is a convenience; it can be bypassed. Validate on the server too: check required fields, a sensible email format, and reasonable lengths. Critically, reject any carriage return or newline in the name/email fields — that's how attackers try to inject extra email headers. Never build the outgoing email by pasting user input into headers.

Stop spam without punishing humans

You rarely need a CAPTCHA. Cheaper, friendlier defenses:

  • Honeypot field — a hidden input real users shouldn't fill; if it's completed, it's probably a bot, so drop it. Conceal it accessibly (not markup a screen reader will still announce and fill), and be aware autofill or password managers can populate it.
  • Time trap — reject submissions that arrive suspiciously fast after page load, allowing that a genuinely quick visitor exists.
  • Server-side rate limiting — cap submissions per IP or session.

Together these stop most bot spam with little friction — but treat them as layered defenses, not certainties, and monitor for real submissions they wrongly reject.

Confirm receipt — twice

Feedback is what makes a form feel trustworthy:

  1. On screen: after a successful submit, show a clear success message (or a thank-you page), not a blank reload. On error, explain exactly what to fix, next to the field.
  2. By email: send an acknowledgment to the sender ("we got your message, we'll reply within one business day") and route the inquiry to your monitored inbox with the visitor's address as Reply-To. Validate the submission before sending anything, and never echo the submitted message back — an auto-reply that blindly quotes user input can be abused to relay mail to third parties.

A form that's easy to fill, hard to abuse, and always confirms itself turns curious visitors into conversations.

What to do

  1. Trim the form to name, email, message, with clear labels and input types.
  2. Validate server-side and strip CR/LF from header-bound fields.
  3. Add a honeypot and a time trap instead of a CAPTCHA.
  4. Show an on-screen success/error state and email a plain acknowledgment — never echo the submitted message back to the address given.
  5. Test the whole path end to end, including what lands in your inbox.

Frequently asked questions

Do I really need a CAPTCHA to stop form spam?
Usually not. A concealed honeypot field, a time trap, and server-side rate limiting together stop most bot spam with little friction. Tune them, though — autofill, password managers or an unusually fast visitor can trip a honeypot or time trap — and monitor for false positives.
Why validate on the server if I already validate in the browser?
Client-side validation is only a convenience and can be bypassed. Always re-check required fields, email format, and lengths on the server, where the data can be trusted.
How do I stop email header injection through a form?
Reject any carriage return or newline in the name and email fields, and never build the outgoing email by pasting user input directly into headers.

Was this helpful?

Questions about your own site? Get in touch — we read every message.

Source: “Does your contact form confirm and protect submissions?” — https://www.siteadvice.be/tips/contact-forms-with-confirmation/ · © 2026 EUREGIO.NET AG. All rights reserved.