using zend form decorators
Posted
by pradeep
on Stack Overflow
See other posts from Stack Overflow
or by pradeep
Published on 2010-03-06T09:48:21Z
Indexed on
2010/03/08
5:36 UTC
Read the original article
Hit count: 602
<div class="field50Pct">
<div class="fieldItemLabel">
<label for='First Name'>First Name:</label>
</div>
<div class="fieldItemValue">
<input type="text" id="firstname" name="firstname" value="" />
</div>
</div>
<div class="clear"></div>
I want the code to appear like this in source code . how do i write the same thing in zend using decorators ?
The element is like
$firstname = new Zend_Form_Element_Text('FirstName');
$firstname->setLabel('FirstName')
->setRequired(true)
->addFilter('StripTags')
->addFilter('StringTrim')
->addErrorMessage('Error in First Name')
->addValidator('NotEmpty');
© Stack Overflow or respective owner