Skip to content
FormSubmit

AI builders

How to make forms work on sites built with Lovable, v0, Bolt and other AI tools

AI website builders generate beautiful forms that don't send anywhere. Here's how to connect them to a real backend with one prompt.

2 min readUpdated Sep 28, 2026

AI website builders like Lovable, v0 and Bolt generate a form's interface but rarely a working backend — so submissions go nowhere. The quickest fix is to tell the AI to post the form to a FormSubmit endpoint. FormSubmit then emails you, stores submissions, filters spam and forwards data to your tools. It takes one prompt.

The problem

Ask an AI builder for "a landing page with a contact form" and you'll get a gorgeous form wired to something like:

tsx
const onSubmit = (data) => {
  console.log(data);
  toast("Thanks! We'll be in touch.");
};

The toast appears, the visitor leaves happy, and the message is lost. Even when the AI adds a backend, it often suggests a database table or an edge function that stores data but never notifies you, has no spam protection, and needs an email provider you haven't set up.

The fix: one prompt

  1. Create a FormSubmit form and copy the endpoint.
  2. Open the form's AI prompts tab in the dashboard — it contains prompts tailored to Lovable, v0, Bolt, Cursor, Claude Code and general assistants, pre-filled with your endpoint and fields.
  3. Paste it into your builder.

Here's the gist of the prompt if you want to write your own:

text
Connect the contact form to FormSubmit (a hosted form backend). Do not create
database tables, API routes or edge functions for this form.

Endpoint: https://formsubmit.app/f/YOUR_FORM_ID

- Submit with fetch: POST a FormData body with header "Accept: application/json".
- The response is JSON: { ok: true, id } or { ok: false, error: { code, message } }.
- Add a hidden honeypot input named "_gotcha" (display:none, tabIndex -1).
- Send a hidden "_ts" field with Date.now() captured when the form first renders.
- Disable the button while sending, show a success message and reset the form,
  and show error.message inline on failure.
- Keep action="<endpoint>" method="POST" on the <form> for no-JS fallback.

Tool-specific tips

  • Lovable — say explicitly not to use Supabase for the form; otherwise it tends to create a table.
  • v0 — ask for a shadcn/ui form component with the endpoint in a constant at the top of the file.
  • Bolt — ask it not to create an API route or serverless function.
  • Cursor / Claude Code — point it at the existing form component and ask for a minimal diff.

Verify it works

Publish, submit the form from the live site and check your inbox and the FormSubmit dashboard. Then add the published domain (for example yourapp.lovable.app) and your custom domain to the allowlist.

Prefer to design the form yourself?

Build it in the form generator, export React or HTML, and ask your AI tool to "use this component as-is".

Frequently asked questions

Why doesn't my AI-generated contact form work?

AI builders generate the form's UI, but usually leave the submit handler as a console.log or a placeholder. There is no server receiving the data unless you add one.

Should I let the AI create a database table or edge function for the form?

You can, but you'll also need email delivery, spam protection and a way to view submissions. A form backend covers all of that without extra infrastructure in your project.

Keep reading

Your form backend is 60 seconds away

Sign in with Google, create a form, paste the endpoint. Free forever for small sites — no credit card.