Integration guide
Post directly to FormDex with accessible controls, an effective honeypot, optional captcha, and multipart attachment support.
Step by step
Use the exact FormDex endpoint in action and POST as the method. Use multipart/form-data when files may be submitted.
For native browser posts, include the API key in the _api_key hidden input. Treat the surrounding source as public and rely on allowed origins, captcha, rate limits, and key rotation.
Use a visually hidden text input—not type=hidden—with the exact configured honeypot name. It must remain empty for genuine submissions.
Use schema field names in each name attribute. Required, length, email, dropdown, checkbox, and number rules are enforced by FormDex.
Submit from the allowed website, verify success in Submissions, verify email/webhook delivery, and confirm a deliberately filled honeypot returns a spam rejection.
Honeypot in this integration
Required for browser-facing HTML forms. Add a normal text input with the exact configured name, then visually move it off-screen. Do not use type=hidden, do not prefill it, and do not let password managers or browser autofill populate it.
Read the honeypot fundamentals →Working example
<form action="https://YOUR_FORMDEX_DOMAIN/api/forms/FORM_ID" method="POST" enctype="multipart/form-data">
<input type="hidden" name="_api_key" value="YOUR_API_KEY" />
<!-- HONEYPOT: keep this text input empty and visually hidden. -->
<!-- Replace "company" if your FormDex honeypot setting uses another name. -->
<div aria-hidden="true" style="position:absolute;left:-10000px;width:1px;height:1px;overflow:hidden;">
<label>Leave this field empty
<input type="text" name="company" tabindex="-1" autocomplete="off" />
</label>
</div>
<label>Email <input type="email" name="email" required /></label>
<label>Message <textarea name="message" required></textarea></label>
<label>Attachments <input type="file" name="attachments" accept=".pdf,.jpg,.jpeg,.png" multiple /></label>
<button type="submit">Send enquiry</button>
</form>Troubleshooting
401 Invalid API key
Copy the active key again and verify the _api_key input is inside the form.
403 Origin not allowed
Save the exact scheme and hostname used by the browser.
400 Spam detected
Ensure the honeypot has no value, browser autofill, or framework default.
Validation failed
Match HTML name attributes to FormDex schema field names and constraints.