splitforms.com

HTML · FORM CONTROL

HTML Radio Button — let users pick one option (live demo)

A radio button is an <input type="radio"> that lets a user pick exactly one option from a group. Radio buttons are linked into a group by sharing the same name= attribute; only the selected option's value is submitted. Below is a working form with a radio group that actually submits.

  • 500 free / mo
  • No backend
  • Copy-paste ready
HTML Radio Button — copy-paste HTML form code that actually submits

Copy-paste ready

The HTML Radio Button 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 radio button form posts to one endpoint. No server, PHP, or API route — submissions land in your inbox and a searchable dashboard.

A form that really submits

Unlike a static reference snippet, this <input type="radio"> form actually sends data to a free splitforms backend, with spam filtering built in.

Copy-paste code

HTML Radio Button 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
radio-button.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>

  <fieldset>
    <legend>Preferred plan</legend>
    <label><input type="radio" name="plan" value="free" checked> Free</label>
    <label><input type="radio" name="plan" value="pro"> Pro — $5/mo</label>
    <label><input type="radio" name="plan" value="lifetime"> Lifetime</label>
  </fieldset>

  <input type="checkbox" name="botcheck" style="display:none">
  <button type="submit">Request access</button>
</form>

How it works

How to add HTML Radio Button to any page.

Copy the html radio button 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 Radio Button 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.

The <input type="radio"> element

Which HTML Radio Button attributes matter?

The <input type="radio"> element takes a handful of attributes — these decide how your form behaves and what actually gets emailed to your inbox when someone submits.

  • name — The group key. Radios that share a name= form a single group — selecting one deselects the others.
  • value — What gets submitted for the group when this option is chosen. Without it, the browser sends "on".
  • checked — Boolean. Pre-selects an option when the page loads.
  • required — Boolean. Put it on at least one radio in the group to force a selection before submit.
  • disabled — Greys out the option and excludes it from submission.
  • id — Used to pair a <label for> with this specific radio. The group identity comes from name=, not id.
HTML Radio Button attributes reference

Common mistakes

HTML Radio Button not working? Here's why.

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

  • Same name = same group — Radios only behave as a group when they share a name=. Two radios with different names are independent and can both be selected.
  • Always set a value — Without value=, a selected radio submits the literal string "on". Set a meaningful value on every option so you can tell them apart.
  • Once selected, you can't un-toggle — Clicking a chosen radio again does not clear it. Provide an explicit "None" option if the field should be optional.
Common html radio button mistakes to avoid

How SplitForms works

From form to workflow in 3 simple steps.

Connect your form, collect every submission, and send data where it needs to go — without building backend infrastructure.

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

Connect your favorite tools and automate everything

SplitForms works with the destinations you route to and the platforms you build on — from Slack and Sheets to WordPress, Shopify, and Next.js.

Connect your SplitForms form to Slack, Google Sheets, Mailchimp, Zapier and more

Trusted by indie teams and agencies shipping forms worldwide

PETAL/COKRAFT.DELINEAR-XBUILD.DEVSTUDIO 71MERIDIANFRAME&CO

Testimonials

Loved by developers shipping at every scale.

40 quotes on record — from indie hacks to agency migrations.

Questions

HTML Radio Button questions, answered.

View all FAQs
What is a radio button in HTML?

A radio button is an <input type="radio"> control. Radios that share the same name= attribute form a group, and the user can select exactly one option from that group. The selected option's value is submitted with the form.

How do I let users select only one radio button?

Give every radio in the set the same name= attribute. The browser then allows only one to be selected at a time — selecting one automatically deselects the others in the group.

How do I create a radio button group in HTML?

Use multiple <input type="radio"> elements with the same name= but different value= attributes, each wrapped in a <label>. Place them inside a <fieldset> with a <legend> for an accessible group caption.

How do I set a default selected radio button?

Add the checked attribute to the option you want pre-selected, e.g. <input type="radio" name="plan" value="pro" checked>.

What value does a radio button submit?

It submits the value of its value= attribute. If you omit value=, the browser submits the string "on", which is rarely useful — always set an explicit value on each radio.

Simple pricing

Start free. Scale when you need more.

Choose a plan that fits your workflow — from a free form endpoint to full automations, exports, and higher submission limits.

Free

$0

Free forever

 
Best for testing

For side projects and indie devs.

  • 500 submissions / mo
  • Unlimited forms
  • Email notifications included
  • Honeypot spam filtering
  • Submissions dashboard
  • MCP setup stays free
  • No credit card required

3-Year

$59/ 36 months
was $99 · save 40% · new-user price

Pay $59. 3 years sorted.

  • 15,000 submissions / mo
  • Unlimited forms
  • Everything in Pro
  • Renews every 3 years
  • Long-term discount
  • Priority support included
  • Vote on the roadmap

No credit card required on Free • Cancel anytime