splitforms.com

HTML · ATTRIBUTE

HTML disabled attribute

Last reviewed

disabled is a boolean attribute for input, select, textarea, button, option, optgroup and fieldset. A disabled control can't be focused or edited, skips validation and is left out of the submitted data. Use readonly when you still need the value. A disabled fieldset disables every control inside it.

  • 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

disabled-example.html
<input type="text" name="plan" value="Pro" disabled>

Copy-paste code

HTML Disabled 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
disabled.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>

  <!-- readonly: locked from editing, but this value IS sent to the backend -->
  <label for="plan">Plan</label>
  <input type="text" id="plan" name="plan" value="Pro" readonly>

  <!-- disabled fieldset: every control inside is off and NOT submitted -->
  <fieldset disabled>
    <legend>Shipping address (coming soon)</legend>
    <label for="address">Address</label>
    <input type="text" id="address" name="address">
  </fieldset>

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

Attributes · disabled

Which HTML Disabled Attribute attributes matter?

These attributes decide how the disabled behaves and what actually gets emailed to your inbox when someone submits.

HTML Disabled Attribute attributes and what each one does
AttributeWhat it doesDocs
disabledTurns off an input, select, textarea or button: it can't be edited or focused, skips validation and is not submitted.MDN
fieldset disabledDisables every control inside the fieldset, except controls inside its first <legend>, which stay usable.MDN
option disabledPrevents an option from being chosen in a <select> dropdown. Screen readers still announce it as disabled.MDN
readonlyThe alternative that locks editing on text-like inputs and <textarea> but still submits the value to your backend.MDN

Common mistakes

HTML Disabled Attribute not working? Here's why.

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

  1. Disabled values are never sent

    A disabled field is completely omitted from the form submission. If the backend needs the value, use readonly instead, or pass the value in an <input type="hidden">.

  2. Disabling the submit button on click can cancel the submit

    If you disable the submit button in its click handler before the form submits, the browser can cancel the submit event. Disable the button inside the form's submit event handler instead.

  3. The first <legend> of a disabled fieldset stays usable

    A <fieldset disabled> disables every control inside it except controls located within its first <legend>, which remain enabled and submittable.

  4. Disabled controls cannot be focused or easily discovered

    Because disabled controls are removed from the tab order, screen-reader users may miss them entirely. Prefer aria-disabled="true" when a control should remain discoverable.

Sources: WHATWG HTML Standard: Enabling and disabling form controls · MDN: disabled

Copy-paste ready

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

How it works

How to add HTML Disabled Attribute to any page.

Copy the html disabled 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 Disabled 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 Disabled Attribute questions, answered.

View all FAQs
Are disabled inputs submitted?

No. The HTML specification requires browsers to omit disabled controls from the form dataset during submission. Use readonly or a hidden input if your backend needs the value.

What is the difference between disabled and readonly?

A disabled field cannot be focused, skips validation and is not submitted. A readonly field can be focused and selected, is submitted with the form, but cannot be modified by the visitor.

How do I disable a submit button after the first click to stop double submits?

Listen for the form's submit event rather than the button's click event, and set button.disabled = true inside that submit handler. Disabling on click before submit fires can cancel the form submission.

How do I disable a whole group of fields?

Wrap the fields in a <fieldset disabled>. The disabled attribute disables every control inside the fieldset at once, except controls inside its first <legend>.

Does required work on a disabled field?

No. Disabled form controls are barred from constraint validation, so required, pattern and other validation rules are completely skipped.

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