Blog

A Contact Form That Emails You — No Backend, No Framework

The simplest possible contact form: one plain HTML file, no framework, no server — just an action attribute pointed at a FormBridge endpoint.

← Back to the blog
AI Powered

Explore this article with AI

Get an instant summary, key takeaways, action items, and answers to your questions about this article.

Choose your AI assistant
ChatGPT Perplexity
Quick answer

Add a plain <form> element with action set to your FormBridge endpoint URL and method="POST" to any static HTML page — no JavaScript, build step, or server is required, which makes it work as-is on hosts like GitHub Pages that serve static files only.

The entire solution

If your site is plain HTML — a static export, a GitHub Pages repo, a single index.html you edit by hand — you don't need a framework, a build step, or a line of JavaScript to get a working contact form. You need a <form> and an endpoint:

<!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <title>Contact</title>
</head>
<body>
  <h1>Get in touch</h1>

  <form action="https://app.formbridge.ai/api/forms/fb_8h2k9p" method="POST">
    <label for="full-name">Name</label>
    <input id="full-name" name="full-name" type="text" required />

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

    <label for="message">Message</label>
    <textarea id="message" name="message" rows="5" required></textarea>

    <button type="submit">Send</button>
  </form>
</body>
</html>

Upload that file — to GitHub Pages, Netlify, S3, wherever — and the form works immediately. There's no server for a host like GitHub Pages to run your logic on, which is exactly why this approach exists: the action URL does the work instead of your host.

What happens when someone submits it

The browser POSTs the form fields to the endpoint. FormBridge scores the submission for spam, and if it passes, emails your notification list and can send an autoresponder back to the address in the email field. You'll see the submission, with every field it sent, in your inbox — no database of your own required.

A couple of things worth adding

Why this is enough

A static site doesn't need a form's complexity to match its host's complexity. One HTML file, one endpoint, and you have submission storage, spam filtering, and email notification — all without writing a line of server code. The free plan covers 1,000 submissions a month, which is plenty for most portfolio sites, small businesses, and side projects hosted this way.

Frequently asked

Can a GitHub Pages site have a working contact form?

Yes. GitHub Pages only serves static files and has no server to process a form submission, but pointing the form's action attribute at an external endpoint like FormBridge means the submission never needs to touch GitHub Pages' server at all.

Do I need any JavaScript for this to work?

No. The browser's native form submission handles the POST request; JavaScript is only needed later if you want to intercept the response and show a custom message instead of the endpoint's default reply.

How do I stop bots from spamming a plain HTML form?

Add a hidden honeypot input that real visitors never fill in, or turn on CAPTCHA from the form's spam protection settings — both work without any JavaScript on your page, since submissions are scored automatically before they reach your inbox.

Key facts

  • A static HTML <form> requires no JavaScript or build tooling to submit data to an external URL via its action and method attributes.
  • Static hosts such as GitHub Pages serve files only and have no server-side runtime, so form processing must happen at an external endpoint.
  • FormBridge's honeypot spam protection uses a hidden field (default name honeypot) that silently routes bot submissions to a separate Spam tab.

Terms in this post

Honeypot field
A form input hidden from real visitors via CSS but left visible to automated bots; any submission that fills it in is treated as spam and filtered out.

Get the next one in your inbox.

One email when we publish something worth reading. No spam — appropriately enough, we'd know.