Zend Form problem:Setting decorators for textarea and textinput length values
Posted
by davykiash
on Stack Overflow
See other posts from Stack Overflow
or by davykiash
Published on 2010-03-24T09:00:40Z
Indexed on
2010/03/24
9:03 UTC
Read the original article
Hit count: 754
zend-decorators
In my Zend form code I have the following
$address = new Zend_Form_Element_Textarea('accounts_address');
$address->setLabel('Address')
->setAttrib('rows','4')
->setAttrib('cols','4')
->addFilter('StripTags')
->addFilter('StringTrim')
->addValidator('NotEmpty');
$address->setDecorators(array(
'ViewHelper',
'Description',
'Errors',
array(array('data'=>'HtmlTag'), array('tag' => 'td')),
array('Label', array('tag' => 'td')),
array(array('row'=>'HtmlTag'),array('tag'=>'tr'))
));
However in my output I do get the attributes set but the text area seems to remain the same size
Output
<tr><td id="accounts_address-label"><label for="accounts_address" class="optional">Address</label></td>
<td>
<textarea name="accounts_address" id="accounts_address" rows="4" cols="4"></textarea></td></tr>
What am I missing?
© Stack Overflow or respective owner