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
- You create a form in BackMyForm. It gets an endpoint:
https://submit.backmyform.com/f/{shortId}. - You point your HTML form to it: its
actionis the endpoint, itsmethodisPOST. - A visitor sends the form. The browser posts the values to the endpoint, as it would to your own server.
- BackMyForm saves the submission, with its files, and redirects the visitor to your thank-you page or to its own.
- 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
| Piece | Needed | What it brings |
|---|---|---|
The action and method="POST" on the form | Always | The submissions are received. |
A name on each field | Always | The values are received. |
| The badge | On the free plan | The "Powered by BackMyForm" link under the form. Empty on the paid plans. |
| JavaScript | No | The visitor stays on the page, and you show your own messages. |
| The forms.js script | No | The time to respond, the not finished submissions and the partial submissions. |
On the free plan, the badge must be shown under each form. The image is empty on the paid plans: add it to every form, and it shows only when it has to.
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:
startedAtisnull; - no not finished submissions: the forms started and never sent are unknown;
- no partial submissions: the values typed before leaving are lost;
- no
submission.startedandsubmission.abandonedwebhook 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.