Docs
Everything you need to connect a form. Most people are done after the quickstart.
Quickstart
- Create an account and add a form in the dashboard.
- Copy the form's endpoint address from its Setup tab.
- Set it as your form's
action, withmethod="POST".
<form action="https://formtango.com/f/your-form-id" method="POST">
<label>
Email
<input type="email" name="email" required>
</label>
<label>
Message
<textarea name="message" required></textarea>
</label>
<!-- Spam trap: leave this hidden and empty -->
<input type="text" name="_gotcha" style="display:none" tabindex="-1" autocomplete="off">
<button type="submit">Send</button>
</form>Every input needs a name attribute. That name is the label you'll see next to its value in your inbox. Fields without a name are not sent by the browser.
Submit with JavaScript
To stay on the page, send the form with fetch. Ask for JSON with an Accept header and you get a JSON answer instead of a redirect. Requests are accepted from any website.
const form = document.querySelector('form');
form.addEventListener('submit', async (event) => {
event.preventDefault();
const response = await fetch('https://formtango.com/f/your-form-id', {
method: 'POST',
headers: { Accept: 'application/json' },
body: new FormData(form),
});
const result = await response.json();
if (result.ok) {
form.reset();
// show your own success message
} else {
// result.error explains what went wrong
}
});You can also post JSON directly:
await fetch('https://formtango.com/f/your-form-id', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ email: 'ada@example.com', message: 'Hello!' }),
});
// → { "ok": true, "id": "..." }Spam protection
Add a hidden field named _gotcha to your form, as in the quickstart. People never see it, but bots fill in every field they find. Any submission with a value in it is quietly discarded and does not count toward your monthly limit.
Each visitor is also limited to 10 submissions per minute per form. Anything that gets through can be moved to the spam folder from your inbox.
Thank-you page and redirects
After a normal form post, visitors see a simple thank-you page with a link back to your site. On paid plans you can send them to your own page instead: set a redirect address in the form's Settings tab, or add a hidden field to override it per form:
<input type="hidden" name="_redirect" value="https://yoursite.com/thanks">Special fields
Fields whose names start with an underscore are instructions for FormTango. They are never stored with the submission.
| Field | What it does |
|---|---|
_gotcha | Spam trap. Must stay empty. |
_redirect | Address to send the visitor to after a successful submission. Paid plans. |
Drop-in script
The least code: add one script tag and mark your form with data-formtango. It sends in the background, shows a message, adds the spam trap and records UTM tags. If JavaScript is off, the form still sends the ordinary way.
<script src="https://formtango.com/formtango.js" defer></script>
<form data-formtango="your-form-id" data-success="Thanks! We'll be in touch.">
<input type="email" name="email" required>
<textarea name="message" required></textarea>
<button type="submit">Send</button>
</form>Optional attributes: data-success, data-error, data-redirect. Using React? See the React guide.
Testing your form
Add a field named _test with the value 1. The submission shows in your inbox for 24 hours, but it is not counted against your plan and nobody is emailed. Up to 50 a day per form.
<input type="hidden" name="_test" value="1">Something not working? Paste your form into the form checker or see troubleshooting.
Hosted forms and embeds
No form of your own yet? Design one in the Builder tab of any form: fields, pages, show/hide rules and calculations. Publish it and you get a link to share, or put it on your site:
<!-- On the page -->
<div data-formtango-embed="your-form-id"></div>
<!-- Or opened from a button -->
<button data-formtango-popup="your-form-id">Contact us</button>
<script src="https://formtango.com/embed.js" async></script>The embedded form resizes itself to fit. Answers arrive in the same inbox as any other submission.
Integrations and API
- Webhooks (signed JSON), Slack, Discord, Microsoft Teams and Telegram alerts.
- Airtable, Notion, Mailchimp, HubSpot and Kit, using your own key for each.
- A REST API with API keys: OpenAPI description.
- An AI connector for ChatGPT, Claude and Cursor: set up with AI.
Set these up in the Connections tab of a form. They are part of paid plans.
Limits and errors
- Up to 100 fields per submission, 5,000 characters per value, 100 KB in total.
- File uploads (paid plans): up to 5 files and 4 MB per submission. The form needs enctype="multipart/form-data".
- Checkbox groups and multi-selects that share a name are joined with commas.
| Status | Meaning |
|---|---|
| 200 / 303 | Saved. JSON requests get 200; form posts are redirected to the thank-you page. |
| 400 | The form had no named fields, or the body could not be read. |
| 403 | The form is paused. |
| 404 | No form exists at that address. |
| 413 | The submission was larger than 100 KB. |
| 429 | Too many submissions from one visitor, or the account reached its monthly limit. |
Stuck? Email support@formtango.com.