From 333f36585b27072d40f8b0d5e7b464b0c50e185a Mon Sep 17 00:00:00 2001 From: Dean Sofer Date: Tue, 26 Jul 2011 01:39:56 -0700 Subject: [PATCH] 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. --- lib/Cake/View/Helper/FormHelper.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Cake/View/Helper/FormHelper.php b/lib/Cake/View/Helper/FormHelper.php index a4be6890a..3bdd5d31c 100644 --- a/lib/Cake/View/Helper/FormHelper.php +++ b/lib/Cake/View/Helper/FormHelper.php @@ -917,7 +917,8 @@ class FormHelper extends AppHelper { '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])) {