splitforms.com

HTML · ATTRIBUTE

HTML enterkeyhint: Change the Mobile Enter Key Label

enterkeyhint is a global attribute that hints which label or icon a virtual keyboard shows on its Enter key. Its values are enter, done, go, next, previous, search and send. It changes only the label, not the behavior: pressing Enter in a single-line input can still submit the form through implicit submission, and `next` does not move focus by itself. Desktop keyboards ignore 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

enterkeyhint-example.html
<input type="text" name="name" enterkeyhint="next">

Want this form to email you its submissions? Point it at a free splitforms endpoint, with no server to build. Get a free access key →

Copy-paste code

HTML enterkeyhint 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.

enterkeyhint.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" enterkeyhint="next" required>

  <label for="email">Email</label>
  <input type="email" id="email" name="email" enterkeyhint="send" inputmode="email" required>

  <label for="message">Message</label>
  <textarea id="message" name="message" rows="4"></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>

Attributes · enterkeyhint

Which attributes go with enterkeyhint?

Pair the Enter key label with the keyboard layout and input type that fit the field.

HTML enterkeyhint Attribute attributes and what each one does
AttributeWhat it doesDocs
enterkeyhintHints which label or icon a virtual keyboard shows for the Enter key.MDN
inputmodeHints which virtual keyboard layout to show, such as an email keyboard.MDN
typeChooses the input's data type, validation and default keyboard behavior.MDN

Common mistakes

enterkeyhint mistakes to avoid

The hint labels a key; form submission and focus behavior still need their own handling.

  1. next does not move focus

    enterkeyhint="next" only changes the key label. To move to another field, handle Enter yourself: field.addEventListener("keydown", (e) => { if (e.key === "Enter") { e.preventDefault(); nextField.focus(); } });. See how to stop Enter from submitting a form.

  2. Enter can still submit the form

    The hint does not change submission behavior. Pressing Enter in a single-line input can implicitly submit its form when the form's normal rules allow it.

  3. Textarea Enter inserts a newline

    In a textarea, Enter normally inserts a newline. The enterkeyhint label does not change that behavior.

  4. React uses enterKeyHint

    In React JSX, use the camelCase prop: <input enterKeyHint="next" />.

  5. Support on mobile browsers

    Most modern mobile browsers support enterkeyhint. Older browsers ignore the hint and use their default key label.

Sources: WHATWG HTML Standard: enterkeyhint · MDN: enterkeyhint

Key benefits

Copy-paste ready

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

How it works

How to add HTML enterkeyhint Attribute to any page.

Copy the html enterkeyhint attribute example, drop in your free access key, and paste it into any page — submissions start landing in your dashboard.

  1. Copy the code

    Copy the HTML enterkeyhint Attribute example below.

  2. Add your access key

    Replace YOUR_ACCESS_KEY with a free splitforms key from the dashboard.

  3. Paste into your site

    Drop the form into any HTML page. Submissions arrive in your dashboard.

Questions

HTML enterkeyhint Attribute questions, answered.

Anything missing? Email us, we read every message.

A person reading answers to common questions
What values can enterkeyhint use?

The allowed values are enter, done, go, next, previous, search and send. They hint which label or icon appears on the virtual keyboard's Enter key.

How do I make Enter go to the next field?

Set enterkeyhint="next" to label the key, then add a keydown handler that checks `e.key === "Enter"`, calls `e.preventDefault()` and focuses the next field. The attribute alone never moves focus.

Does enterkeyhint work on iPhone?

Most modern mobile browsers, including current iPhone browsers, use the hint to choose the virtual keyboard's Enter key label. Older browsers may ignore it.

How do I use enterkeyhint in React?

Use the camelCase JSX prop, for example `<input enterKeyHint="next" />`.

Is enterkeyhint submitted with the form?

No. It is a global presentation hint and is not form data. The input's value is submitted as usual, and Enter can still submit the form.

View all FAQs

Make this form actually submit.

Point your form at splitforms. 500 free submissions a month, spam filtering, webhooks on paid plans — no server.

  • No credit card required
  • 500 free submissions
  • Setup in minutes
Two people celebrating a working contact form