fixed bug in form class that prevented name attribute from being set properly on input elements.

This commit is contained in:
Taylor Otwell
2011-09-08 17:54:05 -05:00
parent fdc1c34676
commit 174d50c044
3 changed files with 11 additions and 1 deletions

View File

@@ -143,6 +143,8 @@ class Form {
*/
public static function input($type, $name, $value = null, $attributes = array())
{
$name = (isset($attributes['name'])) ? $attributes['name'] : $name;
$id = static::id($name, $attributes);
return '<input'.HTML::attributes(array_merge($attributes, compact('type', 'name', 'value', 'id'))).'>'.PHP_EOL;