Fixes #2624: Html::textArea() should respect "name" option.

This commit is contained in:
Qiang Xue
2014-03-04 19:34:09 -05:00
parent 61b64d7513
commit c64ab9d7fc
2 changed files with 3 additions and 2 deletions

View File

@ -1140,12 +1140,12 @@ class BaseHtml
* about attribute expression.
* @param array $options the tag options in terms of name-value pairs. These will be rendered as
* the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
* See [[renderTagAttributes()]] for details on how these are beeing rendered.
* See [[renderTagAttributes()]] for details on how these are being rendered.
* @return string the generated textarea tag
*/
public static function activeTextarea($model, $attribute, $options = [])
{
$name = static::getInputName($model, $attribute);
$name = isset($options['name']) ? $options['name'] : static::getInputName($model, $attribute);
$value = static::getAttributeValue($model, $attribute);
if (!array_key_exists('id', $options)) {
$options['id'] = static::getInputId($model, $attribute);