splitforms.com

HTML · INPUT ATTRIBUTE

HTML multiple attribute: pick several files, options or emails

Last reviewed

The multiple attribute lets a visitor pick more than one file, choose more than one option in a <select>, or type more than one email address. Files and options reach your backend as the same name repeated once per value, while an email input sends one comma-separated string. It is ignored on every other input type.

  • 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

multiple-example.html
<input type="file" name="attachments" multiple accept="image/*,.pdf">

Copy-paste code

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

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

  <label for="cc">Also send a copy to (separate with commas)</label>
  <input type="email" id="cc" name="cc" multiple>

  <label for="topics">Topics (Ctrl or Cmd + click to pick several)</label>
  <select id="topics" name="topics" multiple size="4">
    <option value="pricing">Pricing</option>
    <option value="api">API</option>
    <option value="integrations">Integrations</option>
    <option value="billing">Billing</option>
  </select>

  <label for="attachments">Attachments</label>
  <input type="file" id="attachments" name="attachments" multiple accept="image/*,.pdf">

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

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

What gets submitted

How do multiple values reach your backend?

A <select multiple> sends one name=value pair per chosen option and a file input sends one part per file, both under the same name. An email input with multiple sends a single comma-separated value.

How do multiple values reach your backend?
MarkupSubmitted as
<select name="topics" multiple>, two options chosentopics=pricing&topics=api (the key is repeated)
<select name="topics" multiple>, nothing chosenNothing. The field is left out.
<input type="file" name="attachments" multiple>, three filesThree multipart parts, each named attachments
<input type="file" name="attachments" multiple>, no fileOne empty part named attachments with an empty filename
<input type="email" name="cc" multiple>One value, like cc=a@x.com,b@y.com (whitespace around commas is removed)
multiple on text, number, date or other typesIgnored. The field sends one value as usual.

Files only arrive as files with enctype="multipart/form-data" on the form. splitforms stores uploads on paid plans with Storage connected.

Sources: WHATWG HTML Standard: constructing the entry list · MDN: HTML attribute multiple

Attributes · multiple

Which attributes go with multiple?

multiple allows several values. size, accept, required and enctype control how they are picked and sent.

HTML multiple attribute attributes and what each one does
AttributeWhat it does
multipleA boolean attribute. On a file input, select or email input it allows more than one value.
sizeOn <select multiple>, how many options are visible at once. The default is 4.
acceptOn a file input, the file types the picker offers, like accept="image/*,.pdf". It is a hint, not a security check.
requiredOn a file input with multiple, at least one file must be picked. On a select, at least one option must be chosen.
enctypeSet enctype="multipart/form-data" on the <form> so the file contents are sent, not just the names.

Common mistakes

multiple attribute mistakes to avoid

Most bugs come from reading only the first value on the server or from the wrong input type.

  1. Your backend may keep only the last value

    A repeated key like topics=pricing&topics=api is read as a single value by some frameworks. Use the list reader (for example getAll("topics")), or topics[] as the name in PHP.

  2. Desktop users must Ctrl or Cmd + click a select

    A plain click on a <select multiple> replaces the choice. Many visitors don't know the shortcut, so use a group of checkboxes with the same name for short lists.

  3. An email input sends one string, not a list

    multiple on type="email" checks each comma-separated address, but the form still sends one value. Split it on commas on the server.

  4. multiple does nothing on text or number inputs

    The attribute only works on file and email inputs and on <select>. Other input types ignore it.

  5. Limits on count and size are up to you

    HTML has no attribute for the number of files or their size. Check both in JavaScript for quick feedback, and always again on the server.

Sources: WHATWG HTML Standard: the input multiple attribute · WHATWG HTML Standard: the select multiple attribute · MDN: HTML attribute multiple

Copy-paste ready

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

How it works

How to add HTML multiple attribute to any page.

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

View all FAQs
How do I let users upload more than one file?

Add multiple to the file input, like <input type="file" name="attachments" multiple>, and put enctype="multipart/form-data" on the <form>. Each file is sent as its own part under the same name.

How does a select multiple send its values?

It sends one name=value pair for every chosen option, all with the same name, like topics=pricing&topics=api. If nothing is chosen, the field is not sent at all.

What does multiple do on an email input?

It lets the visitor type several addresses separated by commas, and the browser checks each one. The form still sends a single comma-separated value, so split it on your server.

Does required work with multiple?

Yes. On a file input with multiple, required means at least one file must be picked. On a select multiple, at least one option must be chosen.

Can I limit how many files are picked?

Not with an HTML attribute. Check input.files.length in JavaScript before submit to give quick feedback, and check the count and file sizes again on the server.

Should I use select multiple or checkboxes?

For a short list, checkboxes with the same name are easier, because people don't need to know Ctrl or Cmd + click. Both send the same repeated key, so your backend code stays the same.

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