Remix Integration Guide
Complete guide to integrate MyFormCapture with Remix
Post Remix contact forms to MyFormCapture from the browser with FormData and fetch. Stay on the same route with an inline success state — no custom action endpoint required.
Prerequisites
- A MyFormCapture account — sign up here
- A form created in your MyFormCapture dashboard with its UUID copied
- A Remix project
- Basic Remix routing familiarity
Integration Methods
Client form submit
Handle submit in a client component (or route module with onSubmit), POST FormData to MyFormCapture, and show success inline.
Copy your form UUID
- Log in to your MyFormCapture dashboard
- Open the form
- Copy the form UUID
Important Note
Add a client submit handler
FormData to MyFormCapture.
- Create or edit your contact route component
- Replace
YOUR_FORM_UUIDwith your UUID - Keep the submit logic in the browser (client-side)
import { useState } from 'react';
const ENDPOINT = 'https://myformcapture.com/f/YOUR_FORM_UUID';
export default function Contact() {
const [status, setStatus] = useState('idle');
const [errorMessage, setErrorMessage] = useState('');
async function onSubmit(e) {
e.preventDefault();
const form = e.currentTarget;
setStatus('loading');
setErrorMessage('');
try {
const res = await fetch(ENDPOINT, {
method: 'POST',
headers: {
Accept: 'application/json',
'X-Requested-With': 'XMLHttpRequest'
},
body: new FormData(form)
});
if (!res.ok) throw new Error('Submission failed');
setStatus('success');
form.reset();
} catch {
setStatus('error');
setErrorMessage('Something went wrong. Please try again.');
}
}
if (status === 'success') {
return <p>Thanks — we will be in touch soon.</p>;
}
return (
<form action="https://myformcapture.com/f/YOUR_FORM_UUID" method="POST" data-mfc="true" onSubmit={onSubmit}>
<label htmlFor="name">Name *</label>
<input id="name" name="name" type="text" required />
<label htmlFor="email">Email *</label>
<input id="email" name="email" type="email" required />
<label htmlFor="message">Message</label>
<textarea id="message" name="message" rows={4} />
<button type="submit" disabled={status === 'loading'}>
{status === 'loading' ? 'Sending…' : 'Send Message'}
</button>
{status === 'error' && <p>{errorMessage}</p>}
</form>
);
}
Important Note
e.preventDefault() so Remix does not treat this as a resource action. Send FormData — not JSON.stringify.
Verify in the dashboard
- Run the Remix app and open the contact route
- Submit the form
- Check Leads or Form Responses in MyFormCapture
Important Note
Related Integrations
References & Official Documentation
Next Steps
Configure MyFormCapture
- Set up your timezone
- Configure lead notifications
- Set up advanced spam detection
- Add team members to your account
Advanced Features
- Use our custom form templates
- Try AI Insights for Leads
- Integrate with your CRM
- Set up automated workflows