Skip to content

Commit

Permalink
Added 'integer' => 'number' for HTML5
Browse files Browse the repository at this point in the history
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
Dean Sofer committed Jul 26, 2011
1 parent cfd2d9e commit 333f365
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Cake/View/Helper/FormHelper.php
Expand Up @@ -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])) {
Expand Down

0 comments on commit 333f365

Please sign in to comment.