How to connect an HTML form to Forms.fyi
If you have a classic HTML <form>, you can submit directly to Forms.fyi with a normal POST. This is the simplest integration and works on static sites and any framework.
1. Copy your endpoint URL
In the dashboard, open your form and copy the endpoint URL. It looks like:
https://www.forms.fyi/api/f/<form_id>
2. Add a basic HTML form
Use method="POST" and set action to your endpoint.
<form action="https://www.forms.fyi/api/f/<form_id>" method="POST">
<!-- Honeypot: hide with CSS -->
<input
type="text"
name="special-instructions"
style="display:none"
tabindex="-1"
autocomplete="off"
/>
<label for="email">Email</label>
<input type="email" id="email" name="email" required />
<label for="message">Message</label>
<textarea id="message" name="message" required></textarea>
<button type="submit">Send</button>
</form>3. What happens after submission (redirect vs JSON)
The response behavior depends on how you submit:
- HTML form POST (this page): on success, Forms.fyi responds with an HTTP 303 redirect. By default, we use a built-in thank-you page, or you can set a custom redirect URL on Pro.
- AJAX/JSON (
fetch): you stay on the page and receive a JSON response. You render your own success UI.
4. Troubleshooting quick checks
- Ensure the page is hosted on the same domain as your form’s allowed origin.
- If you’re using AJAX, don’t expect a browser redirect—handle success in JavaScript.
- If you enabled file uploads on Pro, your form must include
enctype="multipart/form-data".