How it works

BackMyForm is the backend of your forms: your form sends its values to the endpoint of a BackMyForm form, which stores them, checks them for spam and delivers them. No server code, no API key and no JavaScript are needed.

The flow of a submission

  1. You create a form in BackMyForm. It gets an endpoint: https://submit.backmyform.com/f/{shortId}.
  2. You point your HTML form to it: its action is the endpoint, its method is POST.
  3. A visitor sends the form. The browser posts the values to the endpoint, as it would to your own server.
  4. BackMyForm saves the submission, with its files, and redirects the visitor to your thank-you page or to its own.
  5. The submission is checked for spam, then delivered: the email notifications, the webhooks, the integrations (Slack, Notion, Airtable...), and the app and the API.

The smallest form

<form action="https://submit.backmyform.com/f/k3x9q2mf" method="POST">
	<input type="email" name="email" required />
	<button type="submit">Subscribe</button>
</form>

Every field needs a name

BackMyForm receives what the browser sends: the fields with a name attribute, under that name. A field without a name is not sent, and never reaches BackMyForm, whatever it shows on the page.

There is nothing to declare in BackMyForm: the fields of the form are detected in the submissions it receives, with the types of their values. Use short, readable and stable names (email, company, message): they are the names of the fields in the app, in the exports, in the webhooks and in the API. Renaming a field on your website creates a new field in BackMyForm.

What you need, and what is optional

PieceNeededWhat it brings
The action and method="POST" on the formAlwaysThe submissions are received.
A name on each fieldAlwaysThe values are received.
The badgeOn the free planThe "Powered by BackMyForm" link under the form. Empty on the paid plans.
JavaScriptNoThe visitor stays on the page, and you show your own messages.
The forms.js scriptNoThe time to respond, the not finished submissions and the partial submissions.

Without the forms.js script

The forms work without the script: every submission sent is received. But BackMyForm only knows about a visitor when they send the form, so without the script you get:

  • no time to respond: startedAt is null;
  • no not finished submissions: the forms started and never sent are unknown;
  • no partial submissions: the values typed before leaving are lost;
  • no submission.started and submission.abandoned webhook events.

With JavaScript, keep the action

When your code sends the form with JavaScript, keep the action of the form on the endpoint anyway: the forms.js script finds the BackMyForm forms by their action, and adds a hidden field to them. Without the action, the script ignores the form, and the submission is received without its time to respond and its not finished submission. Send the form with new FormData(form), built when the form is sent, so that the hidden field goes with it. See JavaScript.

Next steps