how to remove all dtddwrappers and labels on zend form elements?
Answer Posted / Mohammad Shehbaz
To remove all DTD wrappers and labels from Zend Form elements, you can customize the decorators used by the form. Here's an example:
```php
$element = new Zend_Form_Element_Text('username');
// Remove DTD wrapper
$element->setDecorators(array(
array('ViewHelper', array('escape' => false)),
));
// Remove label decorator
$element->removeDecorator('Label');
```
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers