splitforms.com

HTML · INPUT ATTRIBUTE

HTML value attribute: what each form field actually submits

Last reviewed

On text inputs and textareas, the starting value is only a default: what the visitor leaves in the box is sent. Checkboxes and radios send their value when checked ("on" if it is missing). An <option> sends its value instead of the visible text. A named submit button sends its value only when it is clicked.

  • 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

value-example.html
<input type="checkbox" name="newsletter" value="yes">

Copy-paste code

HTML value attribute 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
value-attribute.html
<form action="https://splitforms.com/api/submit" method="POST">
  <input type="hidden" name="access_key" value="YOUR_ACCESS_KEY">

  <label for="email">Email</label>
  <input type="email" id="email" name="email" value="" placeholder="you@company.com" autocomplete="email" required>

  <!-- Sends newsletter=yes when checked, nothing when unchecked -->
  <label><input type="checkbox" name="newsletter" value="yes"> Send me product news</label>

  <!-- The option value is sent, not the visible text -->
  <label for="topic">Topic</label>
  <select id="topic" name="topic">
    <option value="sales">Talk to sales</option>
    <option value="support">Get help with my account</option>
  </select>

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

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

  <!-- Only the clicked button sends intent=... -->
  <button type="submit" name="intent" value="quote">Get a quote</button>
  <button type="submit" name="intent" value="question">Ask a question</button>
</form>

value

What does each control submit?

Text fields send what is in the box when the form is submitted, so value is only the starting text. Checkboxes, radios, options and named buttons send their value string exactly as written.

What does each control submit?
ControlWhat value doesWhat is submitted
<input type="text">, email, telSets the starting textWhatever is in the box at submit
<textarea>Has no value attribute. The text between the tags is the starting textThe current text
<input type="checkbox">The string sent when it is checkedname=value, or name=on with no value. Nothing when unchecked
<input type="radio">The string sent when it is checkedname=value for the checked radio only
<option>Sent instead of the visible labelThe value, or the visible text if value is missing
<button type="submit" name="…">Identifies which button was usedname=value, only for the clicked button
<input type="file">Ignored, for securityThe chosen file

Sources: WHATWG HTML Standard: constructing the entry list · MDN: <input> value

Attributes · value

Which attributes go with value?

value says what is sent, name says under which key, and checked and selected pick the starting choice.

HTML value attribute attributes and what each one does
AttributeWhat it does
valueThe starting text of a text field, or the exact string a checkbox, radio, option or button sends.
nameThe key the value is submitted under. A control without a name sends nothing.
checkedMakes a checkbox or radio start out checked, so its value is sent unless the visitor unchecks it.
selectedGoes on an <option> to make it the starting choice of a <select>.
defaultValueNot an attribute but the JavaScript property that reads the value attribute. input.value reads the live value instead.

Common mistakes

value attribute mistakes to avoid

Most wrong-data bugs come from a missing value or from changing the attribute instead of the live value.

  1. A checkbox without value sends "on"

    If you leave out value, a checked box sends newsletter=on. Set value="yes" or another clear string so your data says what it means.

  2. setAttribute("value") doesn't change what is sent after typing

    Once a visitor has edited a field, the attribute only holds the default. Set input.value = "..." in JavaScript to change what the form submits.

  3. An option without value sends its label

    With no value, the visible text is submitted. Renaming the label then changes your data, so give every option a stable value.

  4. A button's value is only sent for the clicked button

    Only the named submit button that was clicked adds its name=value. Calling form.submit() in JavaScript sends no button value at all.

Sources: MDN: <input> value · WHATWG HTML Standard: the value attribute

Copy-paste ready

The HTML value attribute 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 value attribute 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 value form actually sends data to a free splitforms backend, with spam filtering built in.

How it works

How to add HTML value attribute to any page.

Copy the html value attribute 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 value attribute 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 value attribute questions, answered.

View all FAQs
Why does my checkbox send "on"?

A checkbox with no value attribute sends the default string on when it is checked. Add value="yes" (or any string you want) and that string is sent instead. An unchecked checkbox sends nothing.

Is the option value or text submitted?

The value is submitted. If an <option> has no value attribute, the browser sends its visible text instead, so give each option a value to keep your data stable when labels change.

How do I know which submit button was clicked?

Give the buttons the same name and different values, like name="intent" value="quote" and value="question". Only the clicked button is submitted, so the backend receives intent=quote or intent=question.

What is the difference between value and placeholder?

value is real text in the field that is submitted if the visitor leaves it. placeholder is a grey hint that disappears when typing starts and is never submitted.

How do I set a default value in a textarea?

A textarea has no value attribute. Put the default text between the tags, like <textarea name="message">Hello</textarea>. In JavaScript, set textarea.value.

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