Fixed an issue with input types

This commit is contained in:
Josh Sherman 2013-02-02 16:18:48 -05:00
parent 9c73061a0a
commit 358bf0eefa
2 changed files with 6 additions and 2 deletions

View file

@ -41,7 +41,7 @@ class HTML extends Object
}
// ->inputType('name', $attributes);
if (preg_match('/^input/', $method))
if (preg_match('/^input/', $method) && !isset($attributes['label']))
{
$type = strtolower(str_replace('input', '', $method));
@ -51,6 +51,8 @@ class HTML extends Object
case '': $type = 'text'; break;
}
$method = 'input';
if (is_array($attributes))
{
$attributes['type'] = $type;