AI Websites & Static Frontends

Working Contact Forms for AI-Generated Websites

AI builders like Lovable, Bolt.new, v0, and ChatGPT output clean React or HTML contact forms with placeholder submit handlers. Point your form to a Formgrid endpoint to capture real submissions, block spam, and manage enquiries in one inbox.

Quick answer: How to wire an AI-generated form in minutes

Create a form in Formgrid.dev, copy your public endpoint URL (https://formgrid.dev/api/f/your-form-slug), and submit your AI-generated form using standard HTML method="POST" or JavaScript fetch() with FormData and Accept: application/json. Add your domain (and localhost while testing) under Form Settings → Allowed Domains. Free includes 3 forms, 50 submissions/month, honeypot + Turnstile/hCaptcha, and 100 direct lead emails/month.

Drop-in React / Next.js / Lovable / Bolt.new handler

async function handleSubmit(event) {
  event.preventDefault();
  const form = event.currentTarget;
  const response = await fetch('https://formgrid.dev/api/f/your-form-slug', {
    method: 'POST',
    headers: { Accept: 'application/json' },
    body: new FormData(form), // Avoid mode: 'no-cors' so HTTP errors stay visible
  });
  const payload = await response.json().catch(() => ({}));
  if (!response.ok || payload.success === false) {
    throw new Error(payload.message || 'Unable to send enquiry');
  }
  form.reset();
}

Keep your exact AI-generated UI

Do not throw away your Tailwind, shadcn/ui, or custom HTML layout. Every input just needs a name attribute and a hidden name="honeypot" trap.

Real CORS & error handling (no no-cors)

Configure Allowed Domains in Formgrid settings so browser fetch requests return structured 201 JSON on success or 400/403 messages you can show in your UI.

Built-in Lead CRM instead of raw emails

Every accepted enquiry becomes a lead record with New, Contacted, and Converted stages, private notes, follow-up reminders, and direct 1:1 replies.

Two ways to run forms on AI-generated sites

Connect your AI-built frontend to Formgrid

  • You already generated the layout in Lovable, Bolt.new, v0, Cursor, or ChatGPT.
  • You want to post directly to POST https://formgrid.dev/api/f/{endpointSlug} without deploying a backend server or database.
  • You want Google Sheets or Notion sync plus lead pipeline stages out of the box.

Or generate & host the entire site inside Formgrid

  • You want an editable website, native enquiry forms, custom domain, and CRM hosted under one roof.
  • Free includes 1 lifetime AI website credit; Premium ($12/mo monthly or $10/mo annual) includes 20 credits/month.
  • Skip wiring separate hosting, form APIs, and spreadsheets for small business client sites.

Checklist for Lovable, Bolt.new, v0 & ChatGPT forms

  1. 1 Create a form in Formgrid and copy its endpointSlug.
  2. 2 Ensure every <input>, <select>, and <textarea> in the generated JSX/HTML has a clean name attribute.
  3. 3 Add a hidden input with name="honeypot" (never pre-filled) for automatic bot filtering.
  4. 4 Use FormData with Accept: application/json (or JSON.stringify({ formData: { ... } })) and never pass mode: "no-cors".
  5. 5 Add your preview URL (e.g. http://localhost:5173) and live domain under Form Settings → Allowed Domains.

Frequently asked questions

Yes. Have the component submit FormData via fetch() to https://formgrid.dev/api/f/your-form-slug with Accept: application/json, handle loading/success/error states, and whitelist your deployed origin in Form Settings → Allowed Domains.

Wrap your field keys inside a top-level formData object: JSON.stringify({ formData: { name, email, message }, honeypot: "" }). See /docs/quickstart for copyable snippets.

No. Your endpointSlug is a public submission destination safe for frontend code. Only fg_live_... Management API keys (/api/v1) must remain strictly server-side.

Yes on Premium ($12/mo monthly or $10/mo annual) and Business ($29/mo monthly or $24.17/mo annual), up to 1 GB per file using multipart/form-data (FormData).

Related guides & resources

Your form builder, lead pipeline, and form backend in one place.

Whether you are sharing a form link on WhatsApp, pointing your HTML form to a Formgrid endpoint, or tracking leads through a built-in pipeline, get it done in 2 minutes.

Start Free. No Credit Card Required