splitforms.com

HTML · INPUT TYPE

HTML input type hidden: send extra data with a form

Last reviewed

An <input type="hidden"> isn't shown and can't be focused, but its name and value are sent with the form like any other field. Use it for access keys, redirect URLs, UTM tags or record IDs. Anyone can read or change it in DevTools, so never trust it for prices or permissions.

  • 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

hidden-input-example.html
<input type="hidden" name="access_key" value="YOUR_ACCESS_KEY">
<input type="hidden" name="redirect" value="https://example.com/thanks">

Copy-paste code

HTML Input Type Hidden 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-hidden.html
<form action="https://splitforms.com/api/submit" method="POST">
  <!-- Hidden fields: sent with the form, never shown -->
  <input type="hidden" name="access_key" value="YOUR_ACCESS_KEY">
  <input type="hidden" name="subject" value="New message from the contact page">
  <input type="hidden" name="page" value="/contact">

  <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">

  <button type="submit">Send</button>
</form>

Key facts

How does a hidden input behave?

A hidden input is never drawn and never takes focus, but if it has a name and isn't disabled, its value is sent with the form as name=value, exactly like a text field.

How does a hidden input behave?
FactDetail
Shown on the pageNo. It takes up no space, can't be focused and is skipped by the Tab key.
Sent with the formYes, as name=value, when it has a name and isn't disabled.
ValidationNone. Hidden inputs are barred from constraint validation, so required and pattern are ignored.
Changing the valueSet input.value in JavaScript. On a hidden input this also updates the value attribute.
name="_charset_"Special: with no value, the browser sends the form's character encoding, such as UTF-8.
SecurityNone. The value is in the page source and can be edited before submit, so check it on the server.

Sources: WHATWG HTML Standard: Hidden state (type=hidden) · MDN: <input type="hidden">

Attributes · <input type="hidden">

Which HTML Input Type Hidden attributes matter?

These attributes decide how the <input type="hidden"> behaves and what actually gets emailed to your inbox when someone submits.

HTML Input Type Hidden attributes and what each one does
AttributeWhat it doesDocs
nameThe key the value is sent under. Without a name, the hidden field is never sent.
valueThe text that is sent. Set it in the HTML or later with JavaScript (input.value = ...).
formThe id of a form, so a hidden input placed outside the <form> is still sent with it.
autocompleteOn a hidden input, on and off don't apply (autocomplete="off" is ignored). Only an autofill field name is allowed, which matters for some token fields; most forms leave it out.MDN
disabledA disabled hidden field is NOT sent. Use it to switch a value off without removing the input.MDN

Common mistakes

HTML Input Type Hidden not working? Here's why.

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

  1. Hidden is not secret or tamper-proof

    The value sits in the page source, and anyone can change it in DevTools or POST their own. Check prices, user IDs and permissions on the server.

  2. A disabled hidden field is left out

    Inputs with disabled are not part of the submission. Remove disabled (or the input) on purpose, not by accident.

  3. No required or validation

    Hidden inputs are skipped by constraint validation, so required and pattern do nothing. Validate the value on the server.

  4. No name, no data

    A hidden input without a name is never sent. An id alone is not enough.

Sources: WHATWG HTML Standard: <input type="hidden"> · MDN: <input type="hidden">

Copy-paste ready

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

How it works

How to add HTML Input Type Hidden to any page.

Copy the html input type hidden 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 Hidden 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 Hidden questions, answered.

View all FAQs
Is a hidden input secure?

No. A hidden input only keeps a value off the screen. Anyone can see it in the page source and change it in DevTools before submitting, so never trust it for prices, permissions or user IDs. Check those on the server.

Is a hidden field sent with the form?

Yes. A hidden input with a name is sent with the form like any visible field, as name=value. It is left out only if it has no name or is disabled.

How do I set a hidden input value with JavaScript?

Select the input and set its value property, for example document.querySelector('input[name="page"]').value = location.pathname. The new value is sent the next time the form submits.

Does Google read hidden inputs?

Hidden input values are not visible page content, so they have no SEO effect. Use them for data your form backend needs, not for keywords.

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