Guides · Code

An HTML contact form without a backend

A plain form tag that posts to your endpoint. It works on any static site, GitHub Pages, Netlify or Cloudflare Pages, with no server code and no API key.

  • 2 minutes
  • No backend
  • Free for 250 messages a month

Updated

Step 1 of 60%

Make this guide yours

Type your email and we create your inbox, then put its endpoint in every step. No password, no card.

  1. 1

    The form

    HTML
    <form action="https://inboxpanda.io/f/your-form-id" method="POST">
      <label>Name <input name="name" autocomplete="name" required></label>
      <label>Email <input name="email" type="email" autocomplete="email" required></label>
      <label>Message <textarea name="message" required></textarea></label>
      <!-- Spam trap: keep it hidden -->
      <input name="_honey" style="display:none" tabindex="-1" autocomplete="off">
      <button type="submit">Send</button>
    </form>
  2. 2

    The rules

  3. 3

    Options

    HTML
    <input type="hidden" name="_redirect" value="https://yoursite.com/thanks">
    <input type="hidden" name="_subject" value="New enquiry from the website">
  4. 4

    File uploads

    HTML
    <form action="https://inboxpanda.io/f/your-form-id" method="POST" enctype="multipart/form-data">
      <input name="email" type="email" required>
      <input name="cv" type="file" accept=".pdf,.doc,.docx">
      <button type="submit">Send</button>
    </form>
  5. 5

    Without leaving the page

    HTML
    <script>
      document.querySelector("form").addEventListener("submit", async (e) => {
        e.preventDefault()
        const res = await fetch(e.target.action, {
          method: "POST",
          headers: { Accept: "application/json" },
          body: new URLSearchParams(new FormData(e.target)),
        })
        e.target.outerHTML = res.ok ? "<p>Thanks. We'll get back to you soon.</p>" : "<p>Something went wrong. Please try again.</p>"
      })
    </script>
  6. 6

    Check it works

Questions

Does it work on GitHub Pages, Netlify and Cloudflare Pages?

Is my endpoint a secret?

Do I need a captcha?

Is it free?

Keep going

All guides