splitforms.com

HTML · FORM CONTROL

HTML input type="submit": Submit Button for Forms

Last reviewed

The <input type="submit"> element is a void control: its value attribute is the visible label on the button. It submits its parent form and sends its own name=value pair only when it is the control that was clicked. Unlike <button type="submit">, it cannot contain HTML, icons, or rich text between tags.

  • Live, editable example
  • Copy-paste snippet
  • Attributes & common mistakes
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.

Edit the HTML and re-run it
Runs in a sandbox. Nothing is sent.

Minimal snippet

input-type-submit-example.html
<form action="/contact" method="post">
  <input type="text" name="message">
  <input type="submit" value="Send message">
</form>

Copy-paste code

HTML Input Type Submit 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
input-type-submit.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" autocomplete="name" required>

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

  <label for="message">Message</label>
  <textarea id="message" name="message" rows="5" required></textarea>

  <!-- Honeypot: hidden from people, bots fill it in -->
  <input type="checkbox" name="botcheck" style="display:none" tabindex="-1" autocomplete="off">

  <!-- Only the clicked submit sends action=Send or action=Save draft -->
  <input type="submit" name="action" value="Send">
  <input type="submit" name="action" value="Save draft" formnovalidate>
</form>

Comparison

What is the difference between input type=submit and button type=submit?

Both submit a form and support the same form* override attributes. The main trade-off is content: an <input type="submit"> is a void element with a plain-text value label, while a <button type="submit"> can wrap HTML and icons. See the full HTML button reference for reset and type="button" behaviour.

What is the difference between input type=submit and button type=submit?
Topic<input type="submit"><button type="submit">
Content allowedPlain text only, from the value attributeHTML, text and icons between the opening and closing tags
Default typeAlways submit (there is no other type on <input>)Submit inside a <form> if type is omitted; must set type="submit" explicitly outside a form context when needed
StylingNative button appearance; reset with appearance: none and style like a custom buttonSame baseline, but inner markup can be styled separately
IconsNot inside the element; use CSS background or pick <button> insteadPut <svg> or <img> inside the tags

Sources: WHATWG HTML Standard: Submit Button state · MDN: <input type="submit"> · MDN: <button>

Form data

Which submit button name and value are sent?

When the user clicks one submit control, the browser adds only that control's name=value to the form data set. Other submit buttons in the same form are omitted. Pressing Enter in a single-line field behaves as if the **first** submit button in document order was clicked.

Which submit button name and value are sent?
SituationWhat the server receives
User clicks name="action" value="Send"action=Send plus every other named field
User clicks name="action" value="Save draft"action=Save draft plus the other fields; formnovalidate skips browser validation for that submit
User presses Enter in a text inputThe first <input type="submit"> or <button type="submit"> in the form, if it has a name
JavaScript form.submit()No submit button pair at all; use form.requestSubmit(button) to include one
Reading in JavaScriptOn submit, event.submitter is the clicked button or input (where supported)

Sources: WHATWG HTML Standard: constructing the entry list

Attributes · <input type="submit">

Which attributes does input type=submit support?

The visible label comes from value; the form* attributes override the parent form for this one control.

HTML Input Type Submit attributes and what each one does
AttributeWhat it doesDocs
valueRequired for a readable label. The text shown on the button and sent as the control's value when this input submits the form.MDN
nameThe key sent with the button's value when this input is the submitter, for example name="action" value="Send" → action=Send. Without a name, the server cannot tell which button was used.MDN
disabledBoolean. Greys out the control and prevents it from submitting the form.MDN
formThe id of a <form> so this submit input can sit outside the form element and still submit it.MDN
formactionOverrides the parent form's action URL for submits from this input only. Same idea as on <button type="submit">; see [formaction](/html/formaction).MDN
formmethodget or post. Overrides the form's method when this input submits.MDN
formenctypeHow the body is encoded on POST, such as multipart/form-data. Overrides the form's enctype for this button.MDN
formnovalidateBoolean. Skips constraint validation (required, pattern, etc.) when this input submits, useful for a Save draft control next to Send.MDN
formtargetWhere the response opens (_blank, _self, …). Overrides the form's target for this submit.MDN

Common mistakes

input type=submit mistakes to avoid

Empty labels, missing name on multiple submits, and assuming Enter picks the right button.

  1. An empty value shows a generic label

    Browsers fall back to a vague default when value is missing. Set value="Send message" (or localized text) so everyone sees a clear label and assistive tech gets an accessible name from the value.

  2. Multiple submits need the same name

    Give each <input type="submit"> the same name and different values so the server reads one pair, like action=Send vs action=Save draft. Without name, no button data is sent.

  3. Enter uses the first submit button

    Pressing Enter in a text field submits as if the first submit control in the form was clicked. Put the primary action first, or handle Enter yourself; see [prevent Enter from submitting a form](/blog/prevent-enter-key-submit-form).

  4. You cannot put HTML inside the tag

    Unlike <button>, there is no inner markup—only value text. Use <button type="submit"> when you need icons or nested spans.

Sources: WHATWG HTML Standard: Submit Button state · MDN: <input type="submit">

Copy-paste ready

The HTML Input Type Submit 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 input type submit 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 <input type="submit"> form actually sends data to a free splitforms backend, with spam filtering built in.

How it works

How to add HTML Input Type Submit to any page.

Copy the html input type submit 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 Input Type Submit 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 payment forms →Need time slots? Online booking →

Setup guides for the stacks you use

Questions

HTML Input Type Submit questions, answered.

View all FAQs
What is input type=submit in HTML?

It is a submit button implemented as a void `<input>` element. Its `value` attribute sets the visible label. Clicking it submits the form and, if the input has a `name`, sends that name and value with the other fields.

input type=submit vs button type=submit — which should I use?

Use `<input type="submit" value="Send">` when the label is plain text and you want predictable legacy behaviour. Use `<button type="submit">` when the control needs icons, multiple lines, or styled inner HTML. Both support formaction and the other form* attributes.

How do I know which submit button was clicked on the server?

Give each submit the same `name` and different `value` attributes. Only the clicked control's pair is included, so PHP reads $_POST['action'], Node reads req.body.action, and in JavaScript the submit event's submitter property points at the element that was activated.

Why is the value attribute important for accessibility?

The submit input's accessible name comes from its `value` text. When `value` is set to meaningful words like "Send message", screen readers announce that label and you usually do not need a separate aria-label.

How do I style input type=submit with CSS?

Target `input[type="submit"]` or a class on the input. Many designs reset the native look with `appearance: none`, then set padding, border, background, and `:hover`, `:focus-visible`, and `:disabled` states. The value text still comes from the attribute, not from CSS content.

What happens when I press Enter in a form field?

In a typical form with one text input, Enter submits the form as if the first submit button in document order was clicked—not necessarily the one the user would click with the mouse. Reorder buttons or use JavaScript if that default is wrong; see [prevent Enter from submitting a form](/blog/prevent-enter-key-submit-form).

Is there an older image submit alternative?

Yes: [`<input type="image">`](/html/input-type-image) acts as a graphical submit button (click coordinates are sent as `name.x` and `name.y`). It is uncommon today compared to styled `<input type="submit">` or `<button type="submit">`.

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 per month, billed yearly
Best value

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

  • 15,000 submissions per month
  • 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