HTML forms
Connect a plain HTML form to FormDB: the action and method, field names, the honeypot, file inputs, and what visitors see after sending.
This page covers plain HTML forms that submit without any JavaScript. It explains which attributes you need, how field names work, and how to choose what the visitor sees after they click send.
The two required attributes
Set action to your form's endpoint and method to POST. The endpoint is the address shown at the top of the form's Setup tab.
<form action="https://api.formdb.io/f/your-form-id" method="POST">
<label for="email">Email</label>
<input type="email" id="email" name="email" required />
<label for="message">Message</label>
<textarea id="message" name="message" required></textarea>
<input type="text" name="_gotcha" tabindex="-1" autocomplete="off" style="display:none" />
<button type="submit">Send</button>
</form>If you forget method="POST", the browser sends a GET request and the visitor sees a page saying the URL accepts form submissions via POST. Nothing is saved.
Field names
FormDB stores each value under the input's name attribute. An input without a name is not sent by the browser at all.
- Use short, readable names such as
name,emailororder_number. These names appear in your inbox, CSV exports, notification emails and webhooks. - You do not have to register fields in FormDB first. Any field your form sends is accepted and stored.
- A field named exactly
emailhas a special benefit: when its value is an email address, replying to the notification email goes straight to that person. - Fields whose names start with an underscore, such as
_source, are stored in the inbox but left out of the notification email.
Fields with several values
When the same name appears more than once, for example a group of checkboxes, FormDB stores the values as a list.
<label><input type="checkbox" name="topics" value="billing" /> Billing</label>
<label><input type="checkbox" name="topics" value="support" /> Support</label>If a visitor ticks only one box, the value is stored as a single value, not a list. To always get a list, end the name with [], for example name="topics[]". FormDB removes the [] and stores the field as topics.
The honeypot
A honeypot is a hidden field that people never see, but that many bots fill in automatically. FormDB's honeypot field is named _gotcha.
<input type="text" name="_gotcha" tabindex="-1" autocomplete="off" style="display:none" />If _gotcha arrives with any value, FormDB shows the normal success response and discards the submission. The honeypot is always on, for every form and plan. _gotcha is the only reserved field name.
File inputs
To let visitors attach files, add enctype="multipart/form-data" to the form tag. Without it the browser sends only the file's name, not the file.
<form action="https://api.formdb.io/f/your-form-id" method="POST" enctype="multipart/form-data">
<label for="email">Email</label>
<input type="email" id="email" name="email" required />
<label for="resume">Resume</label>
<input type="file" id="resume" name="resume" />
<input type="text" name="_gotcha" tabindex="-1" autocomplete="off" style="display:none" />
<button type="submit">Send</button>
</form>Add the multiple attribute to the file input to accept more than one file.
Note: File uploads work on every plan, including Free. Each plan includes a set amount of file storage. See File uploads.
What the visitor sees afterwards
After a successful submission from a plain HTML form, one of two things happens.
The hosted thank-you page (default)
If you do nothing, the visitor sees a FormDB page with the heading "Thank you!" and the message "Your submission has been received." It follows the visitor's light or dark mode, shows a Go back link to the page they came from, and has the footer "Powered by FormDB". You can change the heading and message in the form's Settings tab, and hide the footer on the Growth and Business plans. The design cannot be changed.
Your own page (redirect URL)
To send visitors to a page on your site instead:
- Open the form and go to the Settings tab.
- In the General card, enter a full address in Redirect after submit, for example
https://example.com/thanks. - Click Save.
The redirect always goes to that exact address. FormDB does not add the submission's data or ID to it.
You can also set the redirect from inside the form with a hidden _next field. It takes priority over the setting, but only if it points to the site the form was submitted from or to one of the form's allowed domains:
<input type="hidden" name="_next" value="https://example.com/thanks" />When something goes wrong
If the submission is rejected, the visitor sees a hosted page titled "Submission failed" with a short reason, such as "Email is required.", and a Go back link. If you want to show errors inside your own page, next to each field, submit the form with JavaScript instead.
Check required fields on the server too
HTML attributes like required only run in the visitor's browser and can be bypassed. To have FormDB enforce rules itself, define the fields in the form builder. The builder can also generate the HTML for you.
Next steps
- JavaScript and AJAX: submit without a page reload and show your own messages.
- Form settings: redirect URL, pausing a form and more.
- Endpoint reference: exact request and response details.
Ready to try it? Create a free account and send your first submission.