From 4254f09155a62ce14ad796f34d2dbe18c87c4462 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 27 Feb 2013 22:22:23 -0600 Subject: [PATCH] fixing bug in form builder. --- FormBuilder.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/FormBuilder.php b/FormBuilder.php index fa75953..06a8f04 100644 --- a/FormBuilder.php +++ b/FormBuilder.php @@ -274,16 +274,23 @@ class FormBuilder { { $options['name'] = $name; - $options['id'] = $this->getIdAttribute($name, $options); - // Next we will look for the rows and cols attributes, as each of these are put // on the textarea element definition. If they are not present, we will just // assume some sane default values for these attributes for the developer. $options = $this->setTextAreaSize($options); - $value = (string) $this->getValueAttribute($value); + $options['id'] = $this->getIdAttribute($name, $options); - return ''.e($value).''; + $value = (string) $this->getValueAttribute($name, $value); + + unset($options['size']); + + // Next we will convert the attributes into a string form. Also we have removed + // the size attribute, as it was merely a short-cut for the rows and cols on + // the element. Then we'll create the final textarea elements HTML for us. + $options = Html::attributes($options); + + return ''.e($value).''; } /**