Make an AI-Generated Contact Form Actually Work (v0, Bolt, Lovable)
AI site builders generate forms that look finished but the submit button goes nowhere. Here's why, and the one-line fix that makes it store, filter spam, and email you.
The ShipMyForm team
· 3 min read
You described a site, an AI builder generated it, and it looks finished — including a clean contact form. Then you (or a visitor) hit Send, and… nothing. No email, no confirmation, no error. The form is a mannequin.
Here's why: v0, Bolt, Lovable, Cursor, and Replit generate the front end — the form's markup and styling — but not a backend to catch the submission. When someone submits, the browser has nowhere to send the data, so the click does nothing. The fix is one line: point the form at a hosted endpoint that receives, stores, spam-filters, and emails each submission. No server, no API route, no credentials buried in your generated code.
Why the submit button is dead
Every working form has two halves:
- The form — the
<form>, inputs, and styling. This is what the AI built, and it's genuinely done. - The submission handler — the server code that catches the POST, blocks spam, stores it, and emails you. This is what's missing.
AI builders output a site you deploy to a static/edge host — Vercel, Netlify, Cloudflare Pages, GitHub Pages. Those hosts serve files brilliantly and run no server, so there's nothing to execute the second half. It's the same reason a plain HTML site can't email you: the browser can send a form anywhere, but something has to be listening. A form backend is that missing half.
The fix: point the form at an endpoint
A form endpoint is a URL that accepts your
form's submission. You set two attributes on the form the AI already gave you —
action and method — and you're done:
<form action="https://shipmyform.com/f/YOUR_FORM_ID" method="POST">
<input type="text" name="name" placeholder="Your name" required />
<input type="email" name="email" placeholder="[email protected]" required />
<textarea name="message" required></textarea>
<button type="submit">Send</button>
</form>Every input's name becomes a field in the email you receive. That's the whole
integration — the styling, layout, and animations the AI produced stay exactly
as they are.
By builder — it's the same fix, different file
Whatever generated your site, the move is identical; only where you edit differs:
- v0 / Cursor / Bolt (React or Next.js): you'll have a
<form>in a JSX component. Addaction="https://shipmyform.com/f/YOUR_FORM_ID"andmethod="POST"to it. If the AI wired anonSubmithandler that does nothing (orconsole.logs), replace it with the fetch version below — the same endpoint, staying on the page. Full React patterns: React contact form without a backend. - Lovable / Replit: same — find the
<form>in the generated component and set itsaction/method, or wire the fetch call. - Plain HTML export: paste the snippet above over the generated form.
To stay on the page with a success message instead of redirecting, submit with
fetch — the same endpoint, no page reload:
async function handleSubmit(e) {
e.preventDefault();
const res = await fetch("https://shipmyform.com/f/YOUR_FORM_ID", {
method: "POST",
headers: { Accept: "application/json" },
body: new FormData(e.currentTarget),
});
if (res.ok) setSent(true); // { ok: true }
}The details — loading states, errors, validation — are in submit a form with fetch.
ShipMyForm has an MCP server, so an agent like Claude or Cursor can create the endpoint and drop the wired snippet straight into your project — you don't have to leave your editor. Ask it to “create a ShipMyForm endpoint and connect my contact form,” and it handles the round-trip.
What you get the moment it works
Because a real backend now sits behind the form, the parts an AI can't generate come with it:
- Email delivery from an authenticated domain, so notifications actually land in your inbox (not spam).
- Spam filtering server-side — honeypot, rate limiting, and machine-learning screening, no CAPTCHA for real people. Blocked spam doesn't count against your quota.
- A stored inbox with CSV export, so nothing is lost if an email slips past you.
- Routing to Slack, Google Sheets, Notion, or a webhook — toggles, not code.
The bottom line
An AI builder gets you 95% of a contact form — everything except the 5% that makes it work. That 5% isn't more code to generate; it's infrastructure to point at. Create a free endpoint (100 submissions a month, no credit card), paste it into the form the AI already built, and the dead button comes alive.
New to the concept? Start with what a form backend is, or if you're on a specific stack, the React and framework docs have you covered.
Frequently asked questions
- Why doesn't my AI-generated contact form work?
- AI site builders (v0, Bolt, Lovable, Cursor, Replit) generate the front end — the form's HTML/JSX and styling — but not a backend to receive the submission. When someone hits submit, the data has nowhere to go, so nothing happens. The fix is to point the form at a hosted form endpoint that receives, stores, and emails the submission.
- How do I make a v0 or Bolt form send emails?
- Set the form's action attribute to a form backend endpoint and its method to POST. The service behind that endpoint emails you every submission from an authenticated domain — no server, no API route, no email credentials in your generated code. It's usually a one-line change to what the AI already produced.
- Do AI website builders include a form backend?
- Generally no. They produce a static or client-rendered front end you deploy to a CDN (Vercel, Netlify, GitHub Pages), which can't run server code to handle a form. The form markup is real; the submission handling has to come from a form backend you point it at.
- Can my AI assistant set up the form backend for me?
- Yes. ShipMyForm has an MCP server, so an agent like Claude or Cursor can create a form endpoint and drop the wired-up snippet straight into your project — no dashboard visit needed. Otherwise, create a form in the dashboard and paste the endpoint into the form's action yourself.
- Will I get spammed once the form works?
- A public form gets found by bots quickly, which is why the endpoint should filter spam server-side — honeypots, rate limiting, and machine-learning screening — before anything reaches you, with no CAPTCHA for real visitors. Blocked spam shouldn't count against your plan's quota.
Related guides
What Is a Form Endpoint? (And How to Use One)
The URL your form's action points to, explained: how endpoints receive submissions, how they relate to form backends, and how to wire one up.
React Contact Form Without a Backend (Two Patterns)
No Express server, no API route, no email credentials in your client — two copy-paste patterns for a React contact form that actually delivers.
How to Submit a Form with JavaScript fetch()
The vanilla-JS pattern for submitting a form without a page reload — intercept submit, fetch() the data, and render success and per-field errors from the JSON response.