title: Zend_Form Over ridding default decorators
body: <p>I am having trouble over ridding the default set of decorators with Zend_Form.</p>
  
  <p>I am attempting to extend Zend_Form in order to implement a different decorator style.</p>
  
  <pre><code>class CRM_Form extends Zend_Form
  {
   public function init()
   {  
    $this-&gt;setDisableLoadDefaultDecorators(true);
  
    $this-&gt;addDecorator('FormElements')
  -&gt;addDecorator('Form');
  
    $this-&gt;setElementDecorators(array(
    'ViewHelper',
    'Label',
   'Errors',
     new Zend_Form_Decorator_HtmlTag(array('tag' =&gt; 'p'))
    ));
   }
  }
  </code></pre>
  
  <p>When I attempt to make use of this class like so:</p>
  
  <pre><code>$form = new CRM_Form();
  $form-&gt;setAction('/')-&gt;setMethod('post'); 
  $id = $form-&gt;createElement('text','id')-&gt;setLabel('ID:');
  $form-&gt;addElement($id);
  </code></pre>
  
  <p>The old decorators are used (definition list) rather than my paragraph style.</p>
  
  <p>If I addElement()'s in the init() method of the CRM_Form class they use the style that I have set.</p>
  
  <p>How can I force all elements created using that class to use my default style?</p>