splitforms.com

HTML · FORM ATTRIBUTE

HTML Form Action — where form data goes (live demo)

Last reviewed

The action attribute on a <form> tells the browser where to send the submitted data — a server URL or a form-backend endpoint. Omit it and the form submits back to the current page. Test it below, or read the complete guide to the HTML form action attribute for every value and fix.

  • 500 free total
  • No backend
  • Copy-paste ready
Live demo · nothing is sent

What gets submitted

Fill in the form above and press its button. The demo stops the request and lists every name=value pair the browser would send, plus the controls it leaves out.

With a free access key in the form, these fields land in your splitforms dashboard; access_key and botcheck are read by splitforms, not stored as lead data.

Copy-paste code

HTML Form Action code you can paste today.

Replace YOUR_ACCESS_KEY with a key from your free splitforms dashboard. The form posts to one endpoint — submissions land in your inbox and dashboard with spam filtering built in.

Get free access key
form-action.html
<form action="https://splitforms.com/api/submit" method="POST">
  <input type="hidden" name="access_key" value="YOUR_ACCESS_KEY">

  <label for="name">Name</label>
  <input type="text" id="name" name="name" required>

  <label for="email">Email</label>
  <input type="email" id="email" name="email" required>

  <!-- A submit button can override the form's action with formaction -->
  <button type="submit">Send</button>
  <button type="submit" formaction="https://splitforms.com/api/submit?list=beta">Send + join beta</button>
</form>

Attributes · <form action>

Which HTML Form Action attributes matter?

These attributes decide how the <form action> behaves and what actually gets emailed to your inbox when someone submits.

HTML Form Action attributes and what each one does
AttributeWhat it does
action (on <form>)The URL the form submits to. Absolute (https://…) or relative (/submit). Omit it to submit to the current page URL.
formaction (on a button)Overrides the form's action for that one button — handy for multiple submit targets like 'Save' vs 'Save and publish'.
relative URLA path like /api/submit is resolved against the current page's origin.
no actionIf action is omitted entirely, the browser submits to the page's own URL (the document the form lives in).

Common mistakes

HTML Form Action not working? Here's why.

Most broken forms come down to a few small mistakes with the <form action>. Check these before you ship, then forward every submission to Slack or a webhook.

  1. Use an absolute URL for cross-origin

    For a static site posting to a hosted backend, use the full https:// URL. Relative paths only work when the backend runs on the same origin.

  2. Omit ≠ empty

    action="" submits to the current URL on most browsers, but the spec treats an empty action like an omitted one. Be explicit to avoid cross-browser surprises.

  3. Avoid javascript: actions

    Legacy forms used action="javascript:…". It's unreliable and a CSP headache. Run JavaScript from a submit event listener with preventDefault instead.

Sources: WHATWG HTML Standard: <form action> · MDN: <form action>

Copy-paste ready

The HTML Form Action example below is a complete, working form — paste it into any HTML page and it submits, no edits to the markup required.

No backend to build

Your html form action form posts to one endpoint. No server, PHP, or API route — accepted submissions are saved to your dashboard before owner notification email is attempted; delivery time and inbox placement depend on provider and recipient settings.

A form that really submits

Unlike a static reference snippet, this <form action> form actually sends data to a free splitforms backend, with spam filtering built in.

How it works

How to add HTML Form Action to any page.

Copy the html form action example, drop in your free access key, and paste it into any page — submissions start landing in your dashboard.

Copy the code

Copy the HTML Form Action example below.

Add your access key

Replace YOUR_ACCESS_KEY with a free splitforms key from the dashboard.

Paste into your site

Drop the form into any HTML page. Submissions arrive in your dashboard.

How SplitForms works

What happens after someone submits your form?

splitforms receives the submission, filters spam, saves it to your dashboard and emails you — then, on paid plans, sends it on to your webhooks and integrations. No backend infrastructure to build.

A SplitForms contact form submission launching straight to your inbox

Add your endpoint

Point your form to your unique SplitForms endpoint. That's it.

HTML form pointing at a SplitForms submit endpoint

Receive submissions

We instantly capture and organize every submission in your inbox.

Submissions inbox with searchable leads and status pills

Route anywhere

Send data to email, spreadsheets, CRMs, webhooks, and 7,000+ apps.

Generic integration tiles for email, sheets, chat, CRM, automate, and webhook

No credit card required. Set up in under 60 seconds.

Connect & automate

Where can submissions go besides email?

On paid plans, submissions can also go to Slack, Discord, Google Sheets, Notion, Airtable, Zapier or any signed webhook — and splitforms works on the platforms you build on, from WordPress and Shopify to Next.js. With Stripe connected, your forms can take payments too.

Connect your SplitForms form to Slack, Google Sheets, Mailchimp, Zapier and more
NewTake payments on your formsDeposits, bookings, order forms — submitters check out through Stripe and the money goes straight to your Stripe account. Included on every paid plan.See plans →

Setup guides for the stacks you use

Questions

HTML Form Action questions, answered.

View all FAQs
What is the form action attribute in HTML?

The action attribute specifies the URL where the form's data is sent when it's submitted. Set it to a server endpoint or a form-backend URL like https://splitforms.com/api/submit.

What happens if I omit the action attribute?

The form submits to the URL of the page it's on. This is sometimes wanted (e.g. a search filtering the same page) but for most forms you should set action explicitly to a handling endpoint.

Can a submit button change the form action?

Yes — add formaction to a <button type="submit"> to override the <form>'s action for that button only. Useful for multiple targets like "Subscribe" vs "Subscribe + send receipt".

Should action be absolute or relative?

Use an absolute https:// URL when posting to a different origin (like a hosted form backend on a static site). A relative path is fine only if the handler lives on the same domain.

What does the action attribute in HTML forms specify?

It specifies the destination URL — the server or service that will receive and process the submitted form data.

Simple pricing

How much does splitforms cost?

Free gives you 500 submissions for $0 — no card, no time limit. Pro is $5/month for 5,000 submissions a month, and Annual is $49/year for 15,000 a month with every Pro feature.

Free

$0— 500 submissions
 

No card, no time limit

Best for testing

For side projects and indie devs.

  • 500 free submissions
  • Unlimited forms
  • Email notifications included
  • Smart spam filtering
  • Submissions dashboard
  • Redirect after submit
  • MCP server included

Annual

$49/ year
About $4.08/mo, billed yearly
Best value

Every Pro feature with triple the volume — $0.27 per 1,000 at full use.

  • 15,000 submissions / mo
  • Unlimited forms
  • Everything in Pro
  • File uploads with 5 GB storage
  • 3 team seats
  • Priority email support

No credit card required on Free • Cancel anytime • Full pricing and FAQ