Website forms best practices: more submissions, less spam

How to design contact, quote and sign-up forms that people actually finish, while keeping spam out and handling data securely.

By the UK Technology Hub teamPublished 4 minute read

The short answer

The best forms ask only for what's needed, use clear visible labels, explain errors next to the field, work smoothly on phones and with assistive technology, and tell people what happens next. Protect them with server-side validation, honeypots, rate limiting and, where needed, a CAPTCHA. Keep API keys on the server, send submissions reliably and test regularly so leads never go missing.

Forms are where visitors become leads, customers and members. They're also where many websites quietly lose business: too many fields, confusing errors, broken mobile layouts or submissions that never arrive. Small improvements can make a big difference.

Ask for less

Every extra field reduces completion. For a contact or quote form, name, email or phone, and a message are often enough. Ask yourself for each field: do we need this now, or could we ask later?

If you need more information, consider:

  • Optional fields clearly marked.
  • Multi-step forms that show progress for longer processes.
  • Asking follow-up questions after the first contact.

Use clear labels

  • Place labels above fields, visible at all times.
  • Don't rely on placeholder text as the label; it disappears when typing and is often low contrast.
  • Use plain language: "Your email" rather than "Electronic mail address."
  • Mark required or optional fields consistently.

Help people avoid mistakes

  • Use the right input types so phones show the right keyboard: email, phone and number.
  • Support autofill with appropriate autocomplete attributes.
  • Accept different formats for phone numbers and postcodes rather than forcing one.
  • Show examples where formats matter.

Write helpful error messages

  • Show errors next to the relevant field, not just at the top.
  • Explain how to fix the problem: "Enter an email address like name@example.com."
  • Keep what the user typed; never clear the form after an error.
  • Don't rely on colour alone to show errors.

Make forms accessible

  • Every field has a programmatically associated label.
  • Errors are announced to screen readers.
  • Forms can be completed by keyboard alone.
  • Focus moves sensibly, including to error summaries.
  • Touch targets are large enough on mobile.

Use clear buttons and next steps

  • Button text says what happens: "Send enquiry" or "Get my quote," not "Submit."
  • Show a clear confirmation message after sending, explaining what happens next and when.
  • Send a confirmation email where appropriate.

Our guide to website copywriting covers writing microcopy like this.

Explain privacy

Add a short note near the form about how you'll use the information, linking to your privacy policy. Only ask for marketing consent separately and clearly, never pre-ticked.

Stop spam without annoying people

Layer protections:

  • Server-side validation of every field.
  • Honeypot fields: hidden fields that people never fill in but bots often do.
  • Timing checks: submissions completed impossibly fast are likely bots.
  • Rate limiting per visitor.
  • Content filters for spammy links.
  • CAPTCHA or challenge services only when needed; modern options are often invisible to most users.

Handle submissions securely

  • Send form data to a server-side function or service, not directly from the browser to an email API.
  • Keep API keys and credentials in secure server settings, never in website code.
  • Use HTTPS.
  • Strip line breaks from fields used in email headers to prevent header injection.
  • Store submissions securely if you keep them, with a retention period.

Make delivery reliable

Use an authenticated transactional email service so submissions don't land in spam, and consider saving submissions to a database or CRM as a backup. If messages go missing, our guide to fixing a contact form that isn't sending email walks through common causes.

Prevent duplicate submissions

Disable the button while sending, show progress, and use unique submission IDs so double clicks or retries don't create duplicates.

Test regularly

Test forms after every site update, plugin change or email setting change. Set a monthly reminder to send a test submission from each important form.

Forms in multiple languages

If your site serves several languages, translate labels, help text, errors and confirmation emails, not just the page around the form. Our guide to building a multilingual website covers this.

Measure performance

Track form views, starts, completions and abandonment by field where possible. Fields with high drop-off are candidates for removal or simplification.

How we help

Our web development team builds secure, accessible forms with layered spam protection and reliable delivery. Our UI/UX design team designs forms people finish, and our web app team connects submissions to CRMs and workflows.

Frequently asked questions

How many fields should a contact form have?

As few as possible. Name, contact details and a message are often enough for a first enquiry.

Do I need a CAPTCHA on my form?

Not always. Honeypots, timing checks and rate limiting stop much spam. Add a CAPTCHA if spam still gets through.

Why are my form submissions going to spam?

Usually because emails aren't sent through an authenticated service with SPF, DKIM and DMARC set up for your domain.

This guide is general information, not legal, tax or financial advice, and details such as prices, features and rules can change. Product and company names mentioned are trademarks of their respective owners and are used only to identify those products; UK Technology Hub is not affiliated with or endorsed by them.

Related guides

Contact form not sending email? How to fix it

Why website contact forms stop delivering emails and how to fix it, from spam filtering and email authentication to server mail settings and API errors.

All websites & web design guides