Created
March 26, 2014 23:21
-
-
Save chuckreynolds/9796018 to your computer and use it in GitHub Desktop.
Make filling in forms less sucky on mobile devices by using the correct input types.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- For most inputs, you should remove autocorrect and autocapitalize --> | |
| <input type="(your input type)" autocapitalize="off" autocorrect="off"> | |
| <!-- Email --> | |
| <input type="email"> | |
| <!-- Phone number --> | |
| <input type="tel"> | |
| <!-- Some numeric input, like credit card number or ZIP code --> | |
| <input type="text" pattern="d*" novalidate> | |
| <!-- If you use type="submit" instead of type="button", you get the "Go" button on the keyboard--> | |
| <input type="submit"> | |
| <!-- Displays the number and special characters keyboard, should only be used in specific cases--> | |
| <input type="number"> | |
| <!-- Datepicker --> | |
| <input type="date"> | |
| <!-- Datepicker with only months and years --> | |
| <input type="month"> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment