Contact form for Remix
Add a contact form to a Remix or React Router app without an action or email setup. A plain form posts to Lazyform and messages reach your email or Slack.
Why a form backend for Remix
Remix is built around forms and actions, so writing an action that sends email feels natural. The hard parts come after: choosing an email provider, keeping its API key secret, filtering spam, and finding out why a message never arrived.
You can skip all of that for a contact form. A plain HTML form posts to Lazyform, we send the visitor back to your thank-you route, and you keep actions for the parts of your app that need them.
A working contact form
Replace YOUR_ACCESS_KEY with your key from /login, and the redirect URL with your own domain.
export const meta = () => [{ title: 'Contact us' }]
export default function Contact() {
return (
<form action="https://lazyform-api.xvelopers.com/submit" method="post">
<input type="hidden" name="access_key" value="YOUR_ACCESS_KEY" />
<input type="hidden" name="redirect" value="https://example.com/thanks" />
<label>
Name <input name="name" required />
</label>
<label>
Email <input name="email" type="email" required />
</label>
<label>
Message <textarea name="message" rows={5} required />
</label>
<input type="checkbox" name="botcheck" className="hidden" style={{ display: 'none' }} />
<button type="submit">Send</button>
</form>
)
}import { Link } from '@remix-run/react'
export default function Thanks() {
return (
<p>
Thanks! We got your message. <Link to="/">Back home</Link>
</p>
)
}This form works before your JavaScript loads, which fits the way Remix apps are meant to behave. In React Router 7, import Link from react-router instead.
Get submissions where you want them
You get an email for every submission. Add Telegram, Slack, Discord or WhatsApp alerts, or send submissions to Google Sheets, Notion, Airtable or your own webhook. See all integrations.
Full guide
The Remix guide shows the fetch version, error handling, file uploads and captcha.
Questions
Why a lowercase form and not Remix's Form component?
Remix's Form sends the submission to an action in your own app. A lowercase form is a normal browser form, so it can post straight to Lazyform.
Does this work with React Router 7?
Yes. Remix 2 continued as React Router 7, and the route module looks the same there. The form itself is plain HTML, so nothing changes.
Can I still use an action if I want server-side validation?
You can, but most contact forms don't need it. The browser checks required fields, Lazyform runs the spam checks, and paid plans can also validate email addresses and phone numbers.
Can I show the result without leaving the page?
Yes. Add an onSubmit handler that calls fetch with an Accept: application/json header, as shown in the React and Next.js examples, and render the result.