Skip to content
Permalink
Browse files

Use the widget objects for textarea.

Use widgets instead of templates directly.
  • Loading branch information...
markstory committed Feb 21, 2014
1 parent 1ba39b9 commit 1037b103f58a31b608e15044fc849326c2bc1f3e
Showing with 1 addition and 14 deletions.
  1. +1 −14 src/View/Helper/FormHelper.php
@@ -1423,20 +1423,7 @@ public function __call($method, $params) {
*/
public function textarea($fieldName, $options = array()) {
$options = $this->_initInputField($fieldName, $options);
$value = null;
if (array_key_exists('val', $options)) {
$value = $options['val'];
if (!array_key_exists('escape', $options) || $options['escape'] !== false) {
$value = h($value);
}
}
unset($options['val']);
return $this->formatTemplate('textarea', [
'name' => $options['name'],
'value' => $value,
'attrs' => $this->_templater->formatAttributes($options, ['name']),
]);
return $this->widget('textarea', $options);
}
/**

0 comments on commit 1037b10

Please sign in to comment.
You can’t perform that action at this time.