Practical guide

We asked ChatGPT, Claude, Gemini and Perplexity for a contact form 54 times. Here is where the code sends it

54 answers from ChatGPT, Claude, Gemini and Perplexity: which form service ends up in the code, when they write a server instead, and how often the success message is real.

The short answer. We sent 8 fixed prompts for a working contact form to ChatGPT, Claude, Gemini and Perplexity and coded all 54 answers. 34 of 54 send the form to a form service and 17 of 54 write server code you deploy yourself. There is no single default: Web3Forms is the service in 14 of 34 answers and Formspree in 11 of 34, and each assistant has its own favourite. Asked the same question twice, an assistant chose the same backend in only 13 of 24 cases. The code itself was careful: 28 of 29 answers that submit with JavaScript show “sent” only after checking the response.

Formgong

Which form backend do AI assistants pick? 54 answers
We asked ChatGPT, Claude, Gemini and Perplexity for a contact form 54 times. Here is where the code sends it

What we asked

People copy contact-form code from chat assistants. Whatever URL sits in that code decides where their visitors' messages go. We wanted to know which one it is, so on 1 November 2026 we asked:

  1. Add a contact form to my static HTML site that emails me the messages. Give me the code.
  2. My site is built with Astro and hosted on GitHub Pages. Make the contact form send submissions to my email.
  3. Write a React contact form component that actually sends the message to my inbox. I don't want to run my own backend.
  4. I built a landing page with Lovable. How do I make its contact form email me? Show the code.
  5. Next.js app on Vercel: what is the simplest way to get contact form submissions by email? Code please.
  6. I want the messages from my website's contact form in Telegram. Code for a plain HTML form.
  7. My business is in Germany and I care about GDPR. Add a contact form to my static site that sends to my email and keeps the data in the EU.
  8. What's a free way to receive form submissions from a static site without writing a server? Show the code.

Each prompt went into a fresh chat with memory and personalisation off, twice per assistant, with no follow-up. ChatGPT, Claude and Gemini gave all 16 answers each. Perplexity, used signed out as planned, showed a sign-in wall after 6 answers, so it has 6. Copilot could not be measured: signed out it no longer offers a chat at all. That makes 54 answers from 4 assistants.

Where the code sends the form

Every answer that gave code made it actually send something. None of the primary solutions was a mailto: link, and none was a form with no sending code. Netlify Forms came up only as an alternative.

The form services split like this: Web3Forms 14 of 34, Formspree 11 of 34, FormSubmit 3, EmailJS 2, and Formward, Formpost, Formspark and FormWit once each. Each assistant leans its own way:

AssistantAnswersForm serviceServer codeMost common service
ChatGPT1696Formspree (3 of 9)
Claude1696Web3Forms (7 of 9)
Gemini16114Formspree (5 of 11)
Perplexity651Web3Forms (2 of 5)

We had fixed the bar for a headline like “AI assistants default to X” before the run: X had to be in at least 40% of the form-service answers and lead on at least 3 assistants. Web3Forms clears the first part (14 of 34) but leads on only 2 of 4. So the honest headline is that there is no single default.

Ask twice, get a different backend

We asked every question twice in separate chats. For the 24 prompt-assistant pairs with both runs, the two answers used the same backend in 13 of 24, and at least the same kind of solution (a form service, or your own server) in 19 of 24. ChatGPT, asked for a static HTML form, chose Formspree once and FormSubmit the next time. Claude, asked for a free static-site option, chose Formspree once and a Google Apps Script the next time.

So when someone says “ChatGPT recommends X”, they are describing one chat, and the next chat may recommend something else.

Name a framework and you get server code

The plain prompts went almost entirely to form services: for the static HTML, Astro, React and “free, no server” questions, 26 of 27 answers used one. Naming a platform changed that:

  • Next.js on Vercel: 6 of 7 answers wrote a Server Action or route handler that sends through Resend. You need a Resend account, a verified domain and an API key, but no form service.
  • Telegram: 5 of 7 answers wrote a PHP script that calls the Bot API from your server. That needs PHP hosting, which a static site usually does not have.
  • Lovable: ChatGPT wrote a Supabase Edge Function with Resend in both runs. Claude used Web3Forms in both. Gemini did one of each.
  • GDPR / EU: the answers spread out: Formward, Formpost, Formspark, or PHP mail() on your own host. In 2 of 6 the assistant asked where the site is hosted instead of answering.

Is the code safe to paste?

Mostly yes, and more often than we expected. When we tested contact forms on sites built with Lovable and Bolt, a large share showed “Message sent!” and sent nothing. The chat assistants did better. Of the 29 answers that submit with JavaScript, 28 showed the success message only after checking the response. The one exception posted to a Google Apps Script in no-cors mode, where the browser cannot read the result at all.

Where the code goes wrong:

  • 1 of 54 put a Telegram bot token in the page's JavaScript, where any visitor can read it and post as your bot.
  • 3 of 54 wrote server code that reports success even when the email call failed. The client checks the response, but the server always answers 200.

One of those three shows how a fake success happens without anyone meaning it to. The setup steps tell you to save the key as RESEND_API_KEY, but the code reads RESENT_API_KEY. The key comes back empty, Resend refuses the request, and the function still returns 200 with Resend's error inside. The visitor sees “sent”.

Server code from one answer (shortened)
// Supabase Edge Function from one answer (Lovable prompt), shortened.
// The setup steps say: save the key as RESEND_API_KEY. The code reads another name:
const RESEND_API_KEY = Deno.env.get("RESENT_API_KEY");

const res = await fetch("https://api.resend.com/emails", {
  method: "POST",
  headers: { Authorization: `Bearer ${RESEND_API_KEY}` },
  body: JSON.stringify({ from, to, subject, html }),
});
const data = await res.json();
// Resend's error comes back here with status 200, so the form says "sent".
return new Response(JSON.stringify(data), { status: 200 });

The two-line fix

Pass the failure on. If the email API answers with an error, the function should answer with an error too, so the form can keep what the visitor typed and say that sending failed.

Return an error when the email API fails
const res = await fetch("https://api.resend.com/emails", { /* … */ });
if (!res.ok) {
  return new Response(JSON.stringify({ success: false }), { status: 502 });
}
return new Response(JSON.stringify({ success: true }), { status: 200 });

Where Formgong is

We make Formgong, a form backend, so this question is not neutral for us. We registered the design, the prompts and the bars on 16 October, before running anything, and said we would publish whatever came out.

Formgong appeared in the code of 0 of 54 answers and was named in the text of 0 of 54. Perplexity listed formgong.com guides among its sources in 4 of its 6 answers, for Telegram, Lovable, GitHub Pages and Next.js, and then wrote code that posts to a different service.

If you want an assistant to use a particular form service, name it in the prompt. Ours is “post the form to https://formgong.com/submit with my access key”. The contact form generator also gives you the code ready to paste.

Check the code your assistant gave you

Four checks take a few minutes and catch every problem we saw in these 54 answers:

How we did it

  • Pre-registration. Prompts, assistants, coding rules and the two headline bars were written on 16 October 2026, before any prompt was sent. On the run day we logged every change and its reason before looking at the answers: the run date, the product list, and how to code Google Apps Script and SDKs that throw on failure.
  • Modes. ChatGPT: temporary chat, no personalisation, Free plan, default model. Claude: incognito chat, Opus 5.5 at medium effort. Gemini: temporary chat, “Auto”. Perplexity: signed out, in a browser with no logins.
  • Coding. For each answer we coded the first complete solution that sends the form: where it posts, whether the success message depends on the response, and whether a secret is in the page. Two coders did this separately. One was a script; the other read shuffled answers without knowing which assistant wrote them. In the first pass they disagreed on 9 of 54 endpoints, more than our limit, so we clarified the rules and both coded everything again. In the second pass they disagreed on 3 of 54, and we resolved each case by reading the answer.

Limitations

  • One day, one account per assistant, English prompts. Assistants change weekly, and as the repeat runs show, even the same day gives different answers.
  • Perplexity has only 6 answers from one run, and Copilot is not measured. Its signed-out chat is gone, and we did not want an account's history in the results.
  • ChatGPT ran on the Free plan, not Plus as planned, and the interface never named the model.
  • Claude was made by Anthropic, whose model also helped run this study. Its answers were collected the same way as the others, in incognito chats, and coded by the same rules.
  • We read the code; we did not deploy all 54 answers. “Sends” means the code has a sending path, not that an email arrived.

Did your assistant give you something we did not see here, or a form that broke after you pasted it? Write to us at support@formgong.com. We will repeat this in December and add new cases.

Frequently asked questions

Which form backend does ChatGPT recommend?

In our 16 ChatGPT answers (1 November 2026), the most common form service was Formspree, in 3 of 9 answers that used a service, followed by FormSubmit and EmailJS with 2 each. For Next.js and Lovable it wrote server code with Resend instead. Asking the same question twice often gave a different service.

Is AI-generated contact form code safe to use?

Mostly. 28 of 29 answers that submit with JavaScript checked the response before showing “sent”. Watch for two problems: a Telegram bot token or email-API key in browser code (1 of 54), and server code that returns success even when the email call failed (3 of 54).

Why did the assistant give me a different answer than last time?

Answers vary from chat to chat. In our test the same assistant, asked the same question in a new chat, used the same backend in only 13 of 24 cases.

How do I make the assistant use a specific form service?

Name it in the prompt, with the endpoint URL, for example: “post the form to https://formgong.com/submit with my access key, and show success only if the response says success”.

Sources and documentation

Official references for this guide: Resend API: Send email, MDN: fetch() and response.ok, Telegram Bot API, Next.js: Server Actions and Mutations. Formgong HTML form setup, where data is stored.

Rate this guide

Your rating

We read every rating. A comment appears here only after we approve it.

← Back to the blog