From 0f4e74fa504c3ccc73556a460e0966c5848c035f Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Tue, 7 Feb 2012 00:12:04 +0800 Subject: [PATCH] Fix: text field type for string, email and numeric --- htdocs/core/class/html.form.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 6283d6ab087..f4ec9c1e919 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -87,6 +87,7 @@ class Form if ($perm) { $tmp=explode(':',$typeofdata); + if (preg_match('/^(string|email|numeric)$/i',$tmp[0])) $tmp[0] = 'text'; $ret.= '
'; $ret.= $langs->trans($text); $ret.= '
'."\n"; @@ -236,7 +237,8 @@ class Form if (preg_match('/^(string|email|numeric)/',$inputType)) { $tmp=explode(':',$inputType); - $inputType=$tmp[0]; $inputOption=$tmp[1]; + $inputType='text'; + $inputOption=$tmp[1]; if (! empty($tmp[2])) $savemethod=$tmp[2]; } if (preg_match('/^datepicker/',$inputType))