# Forms on AI-built websites

> Make the form on a site built with an AI website builder or coding assistant send real email. What to change, and a prompt you can paste.

AI website builders and coding assistants write good forms, but usually nothing that receives them, so the form does nothing when someone presses Send. FormDoc is the missing part. You keep the form the AI made and change where it sends.

## What to change

1.  Get an access key at [app.formdoc.dev/new](https://app.formdoc.dev/new).
2.  Set the form’s `action` to `https://api.formdoc.dev/v1/submit` and its `method` to `POST`.
3.  Add a hidden field: `<input type="hidden" name="access_key" value="YOUR_ACCESS_KEY">`.
4.  Make sure every input has a `name` attribute, such as `name`, `email` and `message`.
5.  Add the hidden spam trap: `<input type="checkbox" name="botcheck" style="display:none" tabindex="-1" autocomplete="off">`.

## A prompt for your AI assistant

Paste this into your builder or coding assistant, with your key filled in:

TEXT

```text
Make the contact form send its submissions to FormDoc:
- Set the form's action to https://api.formdoc.dev/v1/submit and method to POST.
- Add a hidden input named access_key with the value YOUR_ACCESS_KEY.
- Give every input a name attribute (name, email, message).
- Add a hidden checkbox named botcheck (display:none, tabindex -1, autocomplete off) as a spam trap.
- Remove any API route, server action or email code that was meant to send this form.
```

## If the site uses its own JavaScript to submit

Some generated forms send with JavaScript instead of a normal post. In that case ask for a `fetch` call that posts the form’s data to `https://api.formdoc.dev/v1/submit` with the header `Accept: application/json`, and shows the `message` from the JSON response. The [Next.js guide](https://www.formdoc.dev/docs/nextjs/) has a complete example.

## Test it

Publish the site, send yourself a message and check your inbox. If nothing arrives, confirm your email address first; the [FAQ](https://www.formdoc.dev/faq/) covers the other common causes.

## Common questions

### Can my AI assistant set this up for me?

Yes. Paste the prompt above, with your access key, into your AI builder or coding assistant. It changes the form’s action, adds the hidden key and removes any unused email code.

### Which AI website builders does this work with?

Any that let you see or edit the form’s HTML or code. FormDoc doesn’t depend on how the page was made: it only receives the form post.

### Will the AI-built form be protected from spam?

Yes, once it posts to FormDoc. Add the hidden `botcheck` field from step 5; FormDoc also scores every submission and applies rate limits.
