$text = new Zend_Form_Element_Text('username'); $text->setDecorators(array( 'ViewHelper', 'Errors', array('Label', array('class' => 'input-label')), array('HtmlTag', array('tag' => 'div', 'class' => 'input-wrapper')), ));
$text = new Zend_Form_Element_Text('email'); $text->setDecorators(array( 'ViewHelper', 'Errors', ));This example sets the decorators for a text element with the name "email". The decorators include a ViewHelper to render the text input and an Errors decorator to display errors associated with the element. No additional decorators are added, so the input will be rendered without a label or any additional HTML. The Zend_Form_Element_Text class and the setDecorators method are part of the Zend_Form package library.