HTML5 input type=number in admin settings
|Reported by:||niallkennedy||Owned by:||georgestephanis|
There has been some discussion and tickets around HTML5 inputs, the proper time to introduce changes, and fallback support for browsers not able to take full advantage of the changes. I'd like to start with a relatively simple change: identifying input fields in settings that expect a number.
I would like to accomplish a few things:
- Move input validation to the client instead of waiting for an error on save. If there is an option to close comments after X days I would like to restrict input to characters 0-9; modern browsers can help.
- Communicate minimum or maximum values on the settings page. If we know the backend is going to reject a value over 20 we can restrict the input in the browser to try and help the administrator provide better input values.
- Trigger input helpers such as an up-down arrows in browsers with extra UI help for numbers. iOS brings up a numeric keypad instead of a keyboard for example.
- Fallback behavior is input type=text, same as now.
CSS rules for input type="text" would have to change to include input type="number" for UI consistency.
Attached is a patch for wp-admin/options-discussion as an example.
Change History (69)
- Keywords needs-patch added; has-patch ui-feedback removed
- Milestone changed from 3.3 to Future Release
comment:11 follow-up: ↓ 12 @georgestephanis — 4 years ago
- Cc George@… added
- Owner set to georgestephanis
- Status changed from new to accepted
comment:14 @azaozz — 4 years ago
- Milestone changed from Future Release to 3.4
- Severity changed from minor to normal
comment:28 follow-up: ↓ 29 @georgestephanis — 3 years ago
comment:12 follow-up: ↓ 13 @nacin — 3 years ago
- Resolution set to fixed
- Status changed from reopened to closed