Advanced inputs · SU-316
A verification code opens a digit pad with a Done key
Flip between the version shibroUI flags and the one it ships. The marks and callouts show what changes.
-
Field type
text · no inputmode
-
Field type
inputmode=numeric
Step 2 of 2
Enter the 6-digit code
We texted it to +1 (555) 014-4821. It expires in 10 minutes.
Verification code
4829
theIto
qwertyuiop
asdfghjkl
zxcvbnm
123spacereturn
Step 2 of 2
Enter the 6-digit code
We texted it to +1 (555) 014-4821. It expires in 10 minutes.
Verification code
4829
From Messages482 913
123456Done7890
-
Action key
says “return”
-
SMS code
one-time-code offered -
Action key
enterkeyhint=done
What changes
- Bad
- A
6-digit code in a default text field: the full letter keyboard opens, the action key saysreturn, and the SMS code is not offered. - Good
inputmode="numeric",autocomplete="one-time-code"andenterkeyhint="done": a digit pad with aDonekey, and the SMS code offered above it.
The rules
-
SU-316
Every field gets the right type, inputmode and enterkeyhint. Set
type,inputmode,enterkeyhintandautocompletefrom what the field holds, so the phone opens the right keyboard with the right action key. Digit-only identifiers (verification codes, numeric postcodes, card and account numbers) useinputmode="numeric", nevertype="number".