# Add a contact form to a v0 or Vercel site

> A contact form for v0 or Vercel with no server action, API route or mail provider.

Last updated 2026-11-19. Web version: https://wrenform.com/docs/guides/contact-form-v0

```text
Add a working contact form to this v0 or Next.js project. Create the form by sending POST https://wrenform.com/api/v1/quick-forms with JSON {"email": "YOUR_EMAIL", "framework": "nextjs"} (if you can't make HTTP requests, give me the curl command to run). Put the returned snippet on a /contact page or section, matching the site's style: a label for each field, type="email" on the email field, and keep the _honey field exactly as returned. Show a thank-you message after sending and an error message on failure. Use a client component; no server action or API route. Add no dependencies, API keys or server code. Then tell me to check my inbox for the Wrenform email and click Confirm, because messages are held until I do.
```

Replace `YOUR_EMAIL` with the address that should get the messages, and paste. This creates a [form without an account](/docs/quick-forms): no sign-up, no mail provider, free for 250 submissions a month. Nothing is forwarded until you click **Confirm** in the email we send, and unconfirmed forms are deleted after 7 days. Prefer the dashboard? [Create a form](/sign-in) and use the snippet below.

A form in a Next.js site usually needs a server action or API route plus a mail provider. With Wrenform the browser posts straight to the endpoint, so the page can stay static and nothing secret goes into environment variables.

## Steps

1. Paste the prompt into v0 (or your coding tool for a Next.js project on Vercel).
2. Send a test message from the preview.
3. Click **Confirm** in the email from Wrenform. The held test message arrives within a minute.
4. Deploy to Vercel.

**Lock the form to your site.** A form created this way accepts posts from any site. Once you've confirmed, [sign in](/sign-in) with the same address and add your published domain under **Allowed origins** in the form's settings, for example `https://example.com`.

## What to expect

- An email from **Wrenform** with the subject “Confirm your contact form on Wrenform” arrives within a few minutes. Not
  there? Check your spam folder.
- Click **Confirm** within 7 days. Until then, messages are held, not emailed; once you confirm, they arrive at once.
  Unconfirmed forms are deleted after 7 days.
- Asking your AI tool again within 24 hours returns the same form and doesn’t send a second email.

## Or paste the code

```tsx
// app/contact/contact-form.tsx — no server action or API route needed
"use client";
import { useState } from "react";

export function ContactForm() {
  const [status, setStatus] = useState<"idle" | "sending" | "sent" | "error">("idle");

  async function onSubmit(e: React.FormEvent<HTMLFormElement>) {
    e.preventDefault();
    const form = e.currentTarget;
    setStatus("sending");
    const res = await fetch("https://wrenform.com/f/YOUR_FORM_ID", {
      method: "POST",
      headers: { Accept: "application/json" },
      body: new FormData(form),
    });
    setStatus(res.ok ? "sent" : "error");
    if (res.ok) form.reset();
  }

  return (
    <form onSubmit={onSubmit}>
      <input type="text" name="name" required />
      <input type="email" name="email" required />
      <textarea name="message" required />
      <input type="text" name="_honey" style={{ display: "none" }} tabIndex={-1} autoComplete="off" />
      <button type="submit" disabled={status === "sending"}>Send</button>
      {status === "sent" && <p>Thanks, your message was sent.</p>}
      {status === "error" && <p>Something went wrong. Please try again.</p>}
    </form>
  );
}
```

The form ID is public, so it is safe in client code. A plain `<form action="https://wrenform.com/f/YOUR_FORM_ID" method="POST">` also works in a Next.js page with no JavaScript.

## Spam and email

- The hidden `_honey` field catches most bots. Keep it in the form, hidden, with `autocomplete="off"`.
- A timing check marks submissions sent less than 3 seconds after the form loaded as spam, when the form sends the timing field. The optional script in the HTML snippet adds it; see [the timing field](/docs/spam#the-timing-field). No captcha is needed.
- Each real submission is emailed to you and shown in your dashboard. If a field is missing from the email, check that its input has a `name` and isn't disabled.
- Submissions are stored in the EU.

## Test it

Send the form from the preview and check the thank-you message. After confirming, the message is in your inbox and your dashboard. Send one more from the deployed site.

## Common problems

- **The form sends but no email arrives.** The address hasn't confirmed yet. Look for the email from Wrenform, also in spam.
- **`403 origin_not_allowed`.** The page's origin isn't in the form's **Allowed origins**. Add it, including any preview domain you test from. See [errors](/docs/errors#origin_not_allowed).
- **v0 added a server action, API route or email package.** Ask it to remove them: the client component posts straight to Wrenform.
- **Anything else.** See [troubleshooting](/docs/troubleshooting).

## Next steps

- [Next.js guide](/docs/frameworks/nextjs): the component in detail.
- [Prompts for AI builders](/docs/ai): the same prompt for other tools.
- [Pricing](/pricing): free for 250 submissions a month, paid plans from €5.
