AI-built & no-code sites
My AI-built website has a contact form that doesn't send anything. How do I fix it?
By the FormToMail team · Checked against official sources · Updated
AI site builders usually generate the form's look and a "Thanks!" message, but often no code that delivers the message anywhere, or code that saves it to a database nobody reads. The fix is to connect the form to a form endpoint: paste the endpoint URL and the prompt below into your builder, and every submission is emailed to you.
| What you see | What's happening | Fix |
|---|---|---|
| "Thanks!" but no email, no network request | Only a toast / state change | Add a fetch() to an endpoint |
| Request to Supabase or another database | Stored in a table, never emailed | Send to an endpoint too, or instead |
| Red CORS error in the console | Posting to a URL that doesn't allow your domain | Use an endpoint with CORS open |
| Email arrives empty | Inputs have no name | Add name attributes |
Diagnose it in one minute
- Open the browser's developer tools (Network tab) and submit the form. No request at all means the submit handler only shows a message; nothing is sent anywhere.
- A request to your own domain or to a database (for example a Supabase table) means the message is stored, not emailed. Check that table: your missing messages may be there.
- A request that fails with a red CORS error: see form backend CORS error.
- Inputs without a
nameattribute are not sent; fix the inputs if the email arrives empty.
Prompt to paste into Lovable, Bolt, v0, Replit or Cursor
Replace the URL with your own endpoint first.
Make the contact form send its data to my form endpoint.
On submit, prevent the default, then POST new FormData(form) with fetch to
https://getformtomail.com/f/YOUR_FORM_ID
with the header Accept: application/json.
Every input needs a name attribute (name, email, message).
Add a hidden input named _gotcha (display:none, tabindex -1) as a honeypot.
If the JSON answer has ok: true, show "Thanks! We'll reply soon." and reset the form;
otherwise show the error text. Don't use a database or an email API key in the browser.Then test it
- Publish the site (preview URLs work too).
- Submit the form with your own email address in it.
- Check your inbox (and spam folder) and the FormToMail dashboard.
Quick answers
My ai-built website has a contact form that doesn't send anything, how do i fix it?
Connect it to a form endpoint with the prompt above; the builder rewrites the submit handler.
What's the simplest way for a designer with no coding to make a form work?
Create an endpoint, then paste the prompt above into your AI builder (or the URL into your form's action).
I'm a beginner, how do I make my contact form send emails?
You need a service that sends the email for you; the form only delivers its fields to a URL. A form endpoint is that service.
Form submission works locally but not on my live site?
Usually an environment variable or URL that only exists locally. Use the full https endpoint URL in the code.
What to do next
Create your endpoint, then paste the prompt into your builder.
Get your form endpointSources
Checked: . Prices, limits and features of other services change: confirm current values at the official links above. Product names belong to their owners; we are not affiliated with them.