Form Integration

Bolt.new contact forms that reach your inbox

Bolt will scaffold an entire app in about a minute, and then the contact form submits to a console.log. Give it a Formbold endpoint and each message is saved, filtered and emailed to you, whether you publish on Bolt hosting or Netlify.

Contact Form for Bolt.new

What does the Bolt component look like after the prompt?

Bolt usually scaffolds Vite, React and TypeScript, so expect something like this. The endpoint can come from VITE_FORMBOLD_URL. For the full checklist, see /docs/bolt-contact-form.

bolt.tsx
// src/components/Contact.tsx  (Bolt's usual Vite + React + TypeScript setup)
import { FormEvent, useState } from "react";

// Optional: set VITE_FORMBOLD_URL. On Netlify, add it under
// Site configuration > Environment variables, because Netlify builds ignore .env.
const ENDPOINT = import.meta.env.VITE_FORMBOLD_URL || "https://formbold.com/s/FORM_ID";

export default function Contact() {
  const [busy, setBusy] = useState(false);
  const [result, setResult] = useState<{ ok: boolean; text: string } | null>(null);

  const handle = async (e: FormEvent<HTMLFormElement>) => {
    e.preventDefault();
    const form = e.currentTarget;
    setBusy(true);
    setResult(null);

    const response = await fetch(ENDPOINT, {
      method: "POST",
      headers: { "Content-Type": "application/json", Accept: "application/json" },
      body: JSON.stringify({
        name: form.fullname.value,
        email: form.email.value,
        message: form.message.value,
      }),
    }).catch(() => null);

    setBusy(false);
    if (response?.ok) {
      form.reset();
      setResult({ ok: true, text: "Message received. Check your inbox for our reply." });
    } else {
      setResult({ ok: false, text: "That did not go through. Please retry in a minute." });
    }
  };

  return (
    <form onSubmit={handle} className="space-y-3">
      <input id="fullname" name="fullname" required placeholder="Full name" className="w-full border p-2" />
      <input id="email" name="email" type="email" required placeholder="Email" className="w-full border p-2" />
      <textarea id="message" name="message" required rows={4} placeholder="Message" className="w-full border p-2" />
      <button type="submit" disabled={busy} className="bg-indigo-600 px-4 py-2 text-white">
        {busy ? "Sending" : "Send message"}
      </button>
      {result && <p className={result.ok ? "text-emerald-600" : "text-rose-600"}>{result.text}</p>}
    </form>
  );
}
How it works

How do I make a Bolt.new form send messages?

Pick your host before the first publish. The form doesn't care which one you choose.

1

Grab a Formbold endpoint

Add a new form in Formbold, name it after the Bolt project, and keep its /s/FORM_ID address handy.

2

Prompt Bolt

"In the contact component, replace the placeholder submit with a fetch POST to https://formbold.com/s/FORM_ID. Send name, email and message as JSON with Accept: application/json. Only show the thank-you text if the response is ok, otherwise show a retry message. Do not add a database, Bolt Cloud function or data-netlify attribute."

3

Publish and send one test

Hit Publish in the top right. On Bolt hosting you get a .bolt.host address. Submit once there and look for the entry in Formbold.

Features

Why pick Formbold over Bolt Cloud for a contact form?

Bolt Cloud gives you a database, which is more than a contact form needs. What it does need is delivery, spam control and a place to read entries.

Same code on both hosts

The request goes from the visitor's browser, so moving between Bolt hosting and Netlify does not touch the form.

No table to design

You get a Submissions view with Inbox, Unread, Starred and Spam folders, and an Export button for when you need the data elsewhere.

An email for each message

Every plan sends one. On Starter you can add CC and BCC addresses, handy if a co-founder wants copies.

Bot filtering

Basic Spam Filter is a single toggle. New Bolt sites tend to get bot traffic within days, so turn it on early.

Discord or Telegram pings

On Starter and up, entries can go to Discord, Telegram, Slack or Notion, or to your own webhook.

FAQs

Before you ship it

Questions that come up once the preview works and you're about to publish.

Not for the form. One thing to know: Netlify builds do not read your .env file, so if you use VITE_FORMBOLD_URL, add it in Netlify's environment variables too.

Still have a question?

The docs cover setup, framework guides, integrations and spam protection, step by step.