Details
Description
This example shows the problem.
$form=new Zend_Form; $form->addElement( 'text', 'mytextfield', array( 'label' => 'My Textfield', ) ); $element=$form->getElement('mytextfield'); $element->addDecorator(array('MyDecorator'=>'HtmlTag'), array( 'tag' => 'dl', 'separator'=>PHP_EOL)); print_r(array_keys($element->getDecorators()); // Display element decorators $element->removeDecorator('MyDecorator'); // Remove MyDecorator print_r(array_keys($element->getDecorators()); // MyDecorator hasn't been removed, HtmlTag decorator has been removed instead.
My proposed solution:
Swap this:
For this:
At Zend/Form/Element.php