Framer forms after export: connecting them to your own backend
Why exported Framer forms need a new destination, and how to send them to a Next.js route handler, email service or CRM without faking a successful submission.
Short answer
Exported Framer forms keep their fields and states but need a new destination. In Next.js, add a route handler such as app/api/contact/route.ts, point the form's submit handler at it, send the data to email, a CRM or a database, and test both the success and the error path.
On Framer, a form's submissions are handled by Framer and the integrations you connect there. When the site moves off Framer, that destination is no longer yours to rely on, so every form needs a new one. The good news: in Next.js the backend is a single file.
What a converted form does
In a FrameToNext project, a form's fields, validation states and button are converted to React. Until you connect a destination, submitting shows a clear message that form delivery is not configured. The original endpoint is kept only as a reference in the markup. It never sends data anywhere and never pretends a submission worked. The conversion report lists form delivery under the features that need configuration.
Step 1: Create an endpoint
// app/api/contact/route.ts
export async function POST(request: Request) {
const data = await request.formData();
const email = String(data.get("email") ?? "").trim();
const message = String(data.get("message") ?? "").trim();
if (!email.includes("@") || message.length === 0) {
return Response.json({ error: "Please fill in every field." }, { status: 400 });
}
// Send it where you need it: an email API, your CRM or a database.
// Keep API keys in server-side environment variables, never NEXT_PUBLIC_*.
return Response.json({ ok: true });
}Use the field names your form already has. They are the names you gave the inputs in Framer.
Step 2: Point the form at it
The form is rendered by the FormContainer function in the project's runtime/ folder. Change its submit handler to send the data to your endpoint and switch to the success or error state, so the form shows its own success and error designs:
onSubmit={async event => {
event.preventDefault();
setState("pending");
const response = await fetch("/api/contact", {
method: "POST",
body: new FormData(event.currentTarget),
});
setState(response.ok ? "success" : "error");
}}In the same function, replace the built-in "Form delivery is unavailable" message with your own error text, since it will now only appear when sending really fails.
Step 3: Choose where the data goes
- Email: send each submission with your email provider's API.
- CRM: create a contact or lead through its API.
- Database: store submissions and review them in your own admin.
- Several at once: the route handler can do all of these in order.
Keep spam out
- Add a hidden honeypot field and reject submissions that fill it.
- Rate-limit the endpoint per IP address.
- Add a CAPTCHA if spam continues.
Test both paths
Submit a valid form and confirm the data arrives. Then break it on purpose, for example with an empty field or the endpoint switched off, and confirm the form shows its error state. A form that always says "thanks" loses real messages silently.
Frequently asked questions
Do Framer forms work after export?
The fields, buttons and states are converted, but submissions need a backend you choose. Until it is connected, a FrameToNext form says delivery is not configured instead of faking success.
Where should I send form submissions in Next.js?
To a route handler in your project, which can email the data, create a CRM contact or store it in a database, with API keys kept in server-side environment variables.