FormDexSecure form operations
Try FormDex
FormDexSecure form operations

A product by MeshDex

FormDex is a secure form operations platform for collecting, validating, and routing website submissions. Manage protected endpoints, email notifications, webhook delivery, and submission history from one reliable workspace.

Product

PlatformPricingDocumentation

Access

LoginRegisterReset password

Legal

Privacy PolicyTerms of ServiceRefund PolicyContact Us
  1. Home
  2. Documentation
  3. Integration
  4. Connect a native HTML form
Docs home

Integration guide

Connect a native HTML form

Post directly to FormDex with accessible controls, an effective honeypot, optional captcha, and multipart attachment support.

Step by step

1

Set the form destination

Use the exact FormDex endpoint in action and POST as the method. Use multipart/form-data when files may be submitted.

2

Authenticate the request

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.

3

Add a real honeypot

Use a visually hidden text input—not type=hidden—with the exact configured honeypot name. It must remain empty for genuine submissions.

4

Match every field

Use schema field names in each name attribute. Required, length, email, dropdown, checkbox, and number rules are enforced by FormDex.

5

Test production behavior

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

Where it belongs and who validates it

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

Complete HTML 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.

Before you start

  • • A FormDex endpoint and API key
  • • HTML field names matching the configured schema
  • • Your full HTTPS website origin saved in Protection settings
  • • Captcha provider markup ready when captcha protection is enabled

Production notes

  • • If captcha is enabled, copy the provider script and widget from the form’s Integrate tab.
  • • Use name=attachments and multipart/form-data for supported files when attachments are enabled on the plan.
  • • The honeypot and security fields are removed before FormDex stores or delivers an accepted payload.
View the complete integration overview →