Skip to content
FormToMail

AI-built & no-code sites

How do I add a contact form to a website I built with ChatGPT or Claude?

By the FormToMail team · Checked against official sources · Updated

A site generated in ChatGPT or Claude is usually one or a few static HTML files, so the contact form needs an `action` pointing to a form endpoint and a `name` on every input. Give the AI your endpoint URL and the prompt below, or paste the HTML yourself.

Ask the AI for exactly this
RequirementWhy
action = your endpoint, method="POST"Where the data goes
name on every inputUnnamed fields are never sent
Hidden _gotcha honeypotCatches bots
Optional _next thank-you URLYour own confirmation page

Prompt

text
Update my contact form: set action="https://getformtomail.com/f/YOUR_FORM_ID" and method="POST", give every input a name (name, email, message), add a hidden honeypot input named _gotcha (style="display:none" tabindex="-1" autocomplete="off"). Don't add any server code.

Quick answers

How do I add a contact form to a site built with chatgpt or claude?

Point its action at a form endpoint and name every field.

Can ChatGPT write PHP to send the email?

It can, but most hosts for AI-made sites (GitHub Pages, Netlify, Vercel, Cloudflare Pages) don't run PHP.

How do I add a quote request form to my landing page?

Same pattern with more fields (budget, timeline); every named field shows up in the email.

How do I collect waitlist emails on a static landing page?

A one-field form (email) posting to an endpoint; export the list as CSV from the dashboard.

What to do next

Create the endpoint, then paste the prompt.

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.