splitforms.com

HTML · FORM ATTRIBUTE

HTML autocomplete attribute: every token for form fields

Last reviewed

The autocomplete attribute on an <input>, <textarea>, <select> or <form> names the kind of data a field wants, such as email, given-name, street-address, tel or one-time-code, so browsers and password managers fill in the right saved value. "off" asks the browser not to fill the field, but password managers often ignore it on login fields.

  • 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

autocomplete-example.html
<label for="email">Email</label>
<input type="email" id="email" name="email" autocomplete="email" required>

Copy-paste code

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

  <label for="name">Full 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="phone">Phone (optional)</label>
  <input type="tel" id="phone" name="phone" autocomplete="tel">

  <label for="company">Company (optional)</label>
  <input type="text" id="company" name="company" autocomplete="organization">

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

Values list

Common autocomplete values

Put one of these tokens in autocomplete and the browser knows which saved value to offer. The HTML Standard lists more, such as address-line1, bday and cc-number, but these cover most contact, sign-up and login forms.

Common autocomplete values
ValueUse it for
nameThe full name in one field, like Jane Doe.
given-nameThe first name, when the name is split into two fields.
family-nameThe last name, when the name is split into two fields.
emailAn email address. Pair it with type="email".
telA full phone number, country code included. Pair it with type="tel".
organizationA company or organisation name.
street-addressThe whole street address in one field, often a <textarea>.
postal-codeA ZIP or postal code.
countryA country code; works on a <select> of countries. Use country-name for a free-text country.
usernameThe login name or email on a sign-in form.
current-passwordThe existing password on a sign-in form.
new-passwordA new password on sign-up, reset and change-password forms. Password managers may suggest a strong one.
one-time-codeA one-time code sent by SMS or an authenticator app. Phones can offer the code from the message.
offAsks the browser not to fill the field or save what is typed. Browsers and password managers may ignore it, especially on login fields.

Make the input type match the token too: type="email" with email, type="tel" with tel, type="password" with the password tokens.

Sources: WHATWG HTML Standard: autofill · MDN: autocomplete

Attributes · autocomplete

Which autocomplete values matter?

Most forms only need a named token on each field. These are the switches and prefixes that change how autofill behaves.

HTML Autocomplete Attribute attributes and what each one does
AttributeWhat it does
autocomplete="on"The browser may fill the field, guessing the kind of data from the name, id and label. A named token such as email is clearer.
autocomplete="off"Asks the browser not to fill the field or remember what was typed. A hint, not a rule: password managers often fill login fields anyway.
autocomplete="shipping postal-code"A token list. shipping or billing says which address the field is for, and section-* (like section-gift) keeps two address blocks on one page apart. The field name always comes last.
<form autocomplete="off">Sets the default for every field in the form. A field with its own autocomplete value overrides it.

Common mistakes

autocomplete mistakes to avoid

When autofill fills the wrong field, or won't stop filling one, it is usually one of these.

  1. autocomplete="off" is ignored on login and password fields

    Browsers and password managers often fill username and password fields anyway. On sign-up, reset and change-password forms, use autocomplete="new-password" so the saved password isn't filled in.

  2. Made-up values like "nope" are invalid

    Values such as nope or false are not tokens in the HTML Standard, and browsers handle them differently. Use off or a real token.

  3. A field without a name or id gets unreliable autofill

    Without a token, browsers guess from the name, id and label. Give every field a name (it is also what gets submitted) plus a real autocomplete token.

  4. One name field vs two

    Use name for a single full-name field, or given-name and family-name for split fields. Putting name on a first-name field fills it with the whole name.

Sources: WHATWG HTML Standard: autofill · MDN: autocomplete

Copy-paste ready

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

How it works

How to add HTML Autocomplete Attribute to any page.

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

View all FAQs
How do I turn off autocomplete?

Add autocomplete="off" to the field, or to the <form> to cover every field. Browsers treat it as a hint, and password managers often still fill login fields. On sign-up or password reset forms, use autocomplete="new-password" instead.

What's the autocomplete value for a one-time SMS code?

Use autocomplete="one-time-code". Phones can then offer the code from the SMS above the keyboard. Add inputmode="numeric" so the number pad opens.

Does autocomplete work on a select?

Yes. autocomplete works on <select> as well as <input> and <textarea>. For example, autocomplete="country" on a list of countries lets the browser pick the saved country, as long as the option values match.

What's the difference between autocomplete and autofill?

autocomplete is the HTML attribute you write on a field. Autofill is the browser or password manager feature that fills in saved data. The autocomplete value tells autofill which saved value belongs in the field.

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