title: Zend Form Element Row needs either an id or class set through Zend_Config_Ini
body: <p>I have the following default decorators in a Zend_Config_Ini to set up my form: </p>
  
  <pre><code>elementDecorators.viewHelper.decorator = "ViewHelper"
  elementDecorators.label.decorator = "Label"
  elementDecorators.errors.decorator = "Errors"
  elementDecorators.htmlTag.decorator = "HtmlTag"
  elementDecorators.htmlTag.options.tag = "li"
  </code></pre>
  
  <p>I have the following element definition also in the Zend_Config_Ini:</p>
  
  <pre><code>elements.username.type = "text"
  elements.username.options.label = "Username:"
  elements.username.options.required = true
  </code></pre>
  
  <p>and the following output is produced:</p>
  
  <pre><code>&lt;li&gt;
      &lt;label for="username" class="required"&gt;Username:&lt;/label&gt;
      &lt;input type="text" name="username" id="username" value="" /&gt;
  &lt;/li&gt;
  </code></pre>
  
  <p>Now what I need to know is, how do I (through the ini config file preferably), set the id or class of the LI tag?  I would like the following output:</p>
  
  <pre><code>&lt;li id="form-username-element"&gt; ... &lt;/li&gt;
  </code></pre>
  
  <p>or</p>
  
  <pre><code>&lt;li class="form-2col"&gt; ... &lt;/li&gt;
  </code></pre>
  
  <p><strong>Update:
  I was able to get it by overriding all the decorators in the element config itself like this:</strong></p>
  
  <pre><code>elements.username.options.decorators.viewHelper.decorator = "ViewHelper"
  elements.username.options.decorators.label.decorator = "Label"
  elements.username.options.decorators.errors.decorator = "Errors"
  elements.username.options.decorators.htmlTag.decorator = "HtmlTag"
  elements.username.options.decorators.htmlTag.options.tag = "li"
  elements.username.options.decorators.htmlTag.options.class = "username-row-element"
  </code></pre>
  
  <p>So that will work, however creates a lot of duplication as that would have to go onto every element (with the single change of the last line which would be the class setting itself).  So what I am NOW wondering, is, from the ini file, is there a way to just override the class name using the default decorators (rather than having to duplicate all of the decorators for each element)?</p>