How to show the number keyboard on a mobile input field
Set the field's type or inputmode attribute so the phone knows what is expected: type="tel" for phone numbers, type="email" for emails and inputmode="numeric" for digit-only codes. Most form builders do this through a field type setting, so you often do not need to touch code.
When someone taps a phone number, quantity or card field on their phone and gets the full letter keyboard, they have to switch to the number view by hand. It is a small annoyance, but on a checkout or contact form it slows people down and invites typing mistakes. The fix is usually one or two attributes on the field.
What the problem looks like
You tap into a field labelled Phone and see the normal letter keyboard. Or you tap an email field and the @ key is buried on a second screen. Or a verification code field offers letters when only digits are allowed. The form still works, but the visitor has to hunt for the number row or the symbols key.
Phones choose the keyboard based on the code of the input field. If the field is a plain text box with no hints, the phone assumes you might type anything and shows the general keyboard.
Why it matters
- Enquiries and sales: every extra tap on a form is a chance for someone to give up, especially when using one hand on a small screen.
- Accuracy: a mistyped phone number or postcode means a lost lead or a failed delivery.
- Trust: a form that feels clumsy on a phone makes the whole business feel less careful.
- Search: this is not a ranking switch by itself, but forms are where mobile visitors turn into customers, so they are worth getting right.
How to check your site for free
- Open your site on a real phone, and on both an iPhone and an Android phone if you can. Desktop browser tools that imitate a phone usually do not show the real keyboard.
- Tap into every field on your contact, checkout, booking and signup forms.
- Write down the fields that show the wrong keyboard: phone, email, postcode, quantity, card number, verification code.
- To see why, open the page on a computer, right click the field, choose Inspect, and look at the
<input>tag fortype,inputmodeandautocomplete.
The week 5 mobile usability test in SiteMonday looks at how your pages behave on phones, and its report and ranked fix list help you spot form problems like this. Making the change is up to you or your developer.
How to fix it in general
Two attributes control the keyboard: type and inputmode. Here are typical examples:
<input type="tel" name="phone" autocomplete="tel">
<input type="email" name="email" autocomplete="email">
<input type="text" inputmode="numeric" name="code" autocomplete="one-time-code">
<input type="text" inputmode="decimal" name="amount">
| Field | Use | Keyboard you get |
|---|---|---|
| Phone number | type="tel" | Phone keypad |
| Email address | type="email" | Letters with @ and . within easy reach |
| Website address | type="url" | Letters with . and / within easy reach |
| Digits only (PIN, code) | inputmode="numeric" | Number pad |
| Amounts with decimals | inputmode="decimal" | Number pad with a decimal separator |
| Search box | type="search" | Letters with a Search or Go key |
Why not just use `type="number"`? It does show a number pad, but it was designed for real quantities. It adds up and down arrows on desktop, the mouse wheel can change the value by accident, and it can drop leading zeros. That makes it a poor choice for phone numbers, card numbers and postcodes. For digits that are really identifiers, inputmode="numeric" is the safer option.
A few cautions:
- Do not force a number pad on fields that can contain letters or spaces. UK and Canadian postcodes contain letters, so they need the normal keyboard.
- The iPhone number pad has no minus sign, so fields that accept negative numbers need a different approach.
- Older iPhones relied on
pattern="[0-9]*"to show the number pad. It is harmless to add on digit-only fields. - Add
autocompletevalues as well (for exampletel,email,postal-code,one-time-code). They let the phone suggest saved details or a code from a text message.
Common platforms
Most site builders hide the attributes behind a field type. Menu names change between versions and themes, so look for the form editor and a setting called Field type, Input type or similar.
- WordPress: form plugins such as Contact Form 7, WPForms and Gravity Forms have Phone, Email and Number field types. Pick the right one instead of a plain text field. See the WordPress guide.
- Shopify: contact and newsletter forms live in your theme, so you may need to edit the input type in the theme code. Shopify controls its own checkout, so you generally cannot change fields there. See the Shopify guide.
- Wix and Squarespace: the form tools let you choose a field type such as Email or Phone when you add or edit a field.
- Webflow: select the input in the Designer and look for its type and custom attribute settings.
- Elementor and WooCommerce: the Elementor form widget has a Type option per field (for example Tel or Email). WooCommerce normally gives the checkout phone field a phone type, but a theme or customisation can change that.
If your builder has no setting for what you need, such as inputmode, ask your developer to add the attribute, or use a custom code option if your plan includes one.
How to confirm the fix worked
- Clear your cache or open the page in a private tab so you are not seeing an old version.
- Tap each changed field on a real iPhone and a real Android phone.
- Check that the right keyboard appears and that autofill still works.
- Submit the form with realistic entries, such as a phone number with a plus sign or spaces, to make sure validation does not reject good input.
If the page zooms in when you tap a field, that is a different problem. See form zoom on iOS.
How to stop it coming back
- Make choosing the right field type part of your routine whenever someone adds a form field.
- Retest forms on a real phone after a theme change, plugin update or redesign, since new templates often reset field types.
- Keep a short list of your key forms (contact, checkout, booking) and tap through them on a phone before launching changes.
- When switching form plugins, check the new one offers phone and email field types before moving over.
Step by step for your platform
- Wrong keyboard showing on phone forms on WordPress
- Wrong keyboard showing on phone forms on Shopify
- Wrong keyboard showing on phone forms on Wix
- Wrong keyboard showing on phone forms on Squarespace
- Wrong keyboard showing on phone forms on Webflow
- Wrong keyboard showing on phone forms on Elementor
- Wrong keyboard showing on phone forms on WooCommerce
Questions
Which attribute shows a number keyboard on a phone?
Use `inputmode="numeric"` for digit-only fields, or `type="tel"` for phone numbers. Both tell the phone to show a number pad.
Should I use type="number" for phone numbers?
No. It can strip leading zeros and adds spinner arrows, so `type="tel"` is the better choice for phone numbers.
Will the same keyboard appear on iPhone and Android?
Not exactly. Both show suitable keyboards, but the layout and extra keys differ between devices and keyboard apps.
Can I fix this without editing code?
Often yes. Most form builders and plugins have a field type setting where you choose Phone, Email or Number.
How do I show a number keyboard for a postcode?
Only if your postcodes are digits only, use `inputmode="numeric"`. If they can include letters, leave the normal keyboard.
Does this change how the form is validated?
Mostly no. `inputmode` and `type="tel"` only change the keyboard, but `type="email"`, `type="url"` and `type="number"` also add basic browser format checks. Either way, you still need to validate entries on the server and in the form.