Skip to content

Forms ​

Basic HTML form ​

Create a form in the dashboard, then use its endpoint as the form action:

html
<form action="https://on.dev/f/YOUR_FORM_ID" method="POST">
  <label>Email <input name="email" type="email" required></label>
  <label>Message <textarea name="message"></textarea></label>
  <input name="_honey" type="text" hidden tabindex="-1" autocomplete="off">
  <button>Send</button>
</form>

After a successful post the visitor is sent to a thank-you page. Every field name becomes a column in your dashboard and CSV export.

Sending with JavaScript ​

Send JSON, or set Accept: application/json, and the endpoint answers with JSON instead of a redirect. CORS is open, so this works from any origin.

js
const res = await fetch('https://on.dev/f/YOUR_FORM_ID', {
  method: 'POST',
  headers: { 'content-type': 'application/json' },
  body: JSON.stringify({ email, message }),
});
const { ok, error } = await res.json();

Special fields ​

Fields whose names start with _ change behaviour and are not stored.

FieldWhat it does
_honeyHoneypot. Hide it; bots fill it in and their submission is dropped. _gotcha also works.
_redirectWhere to send the visitor afterwards. Must be on the same site as the form (or one of its allowed domains).
_subjectSubject line for the alert email.
_replytoAddress used as Reply-To on the alert email. Without it, an email field is used.

Responses ​

StatusMeaning
303 / 200Accepted (redirect for HTML forms, {"ok":true} for JSON).
400Empty or unreadable submission.
403Form paused, wrong website, or failed Turnstile check.
404No form with that id.
413Larger than 128 KB.
422Contains a password, card number or other secret.
429Too many submissions from one visitor, or the monthly limit is reached.

Spam protection ​

  • Honeypot: add the hidden _honey field shown above.
  • Allowed domains: in the form's settings, list the sites allowed to post (subdomains included). Posts from anywhere else are refused.
  • Rate limits: each visitor can send 10 submissions a minute per form.
  • Link checks: messages stuffed with links go to the Spam tab. Spam never sends alerts and doesn't count towards your limit.
  • Cloudflare Turnstile: add the Turnstile widget to your form and paste its secret key into the form's settings. Submissions without a valid token are refused.

What forms can't collect ​

To keep on.dev from being used for phishing, submissions with fields that look like passwords, card numbers, security codes, seed phrases or private keys are refused with a 422. See the acceptable use policy.

Limits ​

File uploads aren't supported yet; file fields are skipped. Submission history is kept for 30 days on Free and 365 days on Pro.