Skip to content
FormToMail

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 the submit button is probably doing
What you seeWhat's happeningFix
"Thanks!" but no email, no network requestOnly a toast / state changeAdd a fetch() to an endpoint
Request to Supabase or another databaseStored in a table, never emailedSend to an endpoint too, or instead
Red CORS error in the consolePosting to a URL that doesn't allow your domainUse an endpoint with CORS open
Email arrives emptyInputs have no nameAdd name attributes

Diagnose it in one minute

  1. 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.
  2. 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.
  3. A request that fails with a red CORS error: see form backend CORS error.
  4. Inputs without a name attribute 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.

text
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

  1. Publish the site (preview URLs work too).
  2. Submit the form with your own email address in it.
  3. 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 endpoint

Sources

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.