Permalink
Browse files

Added `'integer' => 'number'` for HTML5

Located in $map in the `FormHelper::input()` method. This means that if a field input is related to an integer column in the database, it will show up as a number input in the HTML5 form (where supported) yet gracefully degrade.
  • Loading branch information...
1 parent cfd2d9e commit 333f36585b27072d40f8b0d5e7b464b0c50e185a Dean Sofer committed Jul 26, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/Cake/View/Helper/FormHelper.php
@@ -917,7 +917,8 @@ public function input($fieldName, $options = array()) {
'string' => 'text', 'datetime' => 'datetime',
'boolean' => 'checkbox', 'timestamp' => 'datetime',
'text' => 'textarea', 'time' => 'time',
- 'date' => 'date', 'float' => 'text'
+ 'date' => 'date', 'float' => 'text',
+ 'integer' => 'number'
);
if (isset($this->map[$type])) {

0 comments on commit 333f365

Please sign in to comment.