Technical Guide4 min readLast updated: 2026-08-01

How to Add a Contact Form to Any Static Site Without a Backend

A complete step-by-step developer guide to adding contact forms to static websites (HTML, Astro, Hugo, Jekyll) using Form2Lead API endpoints.

Direct AnswerGEO / AEO Extractable

TL;DR: How to implement how to add a contact form to any static site without a backend?

To add a contact form to a static site without building a backend, point your HTML form action attribute to a Form2Lead endpoint (`POST https://submit.form2lead.com/f/...`), which validates submissions, blocks spam, and emails you incoming leads.

Verified product capabilityRead documentation →

Why Static Sites Need Endpoint Services

Static site generators like Astro, Hugo, and Jekyll excel at speed, security, and hosting efficiency. However, because they lack dynamic server code, receiving HTML form POST requests normally requires spinning up a server, Lambda function, or third-party backend.

Step 1: Create Your Form2Lead Endpoint

Sign in to Form2Lead, create a project, and click "New Form". Copy your unique endpoint URL (`https://submit.form2lead.com/f/xyz123`).

Step 2: Add HTML Markup to Your Static Page

Paste the endpoint URL directly into your HTML form action attribute. Include name attributes on all input fields.

<form action="https://submit.form2lead.com/f/xyz123" method="POST">
  <label for="name">Name</label>
  <input type="text" id="name" name="name" required />

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

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

  <button type="submit">Send Message</button>
</form>

Step 3: Test Submission & Verification

Submit a test lead through your static website. Check your email and Form2Lead dashboard inbox to verify immediate delivery.

Guide Q&A

Direct AnswerGEO / AEO Extractable

Do I need PHP or Node.js running on my web server?

No! Form2Lead handles all server execution, spam checks, and notification delivery.