title: Zend Form - Method to extract Label value from Form Class to show in View Script?
body: <p>I'm in the process of switching my forms to use a View Script as their decorators.
  The examples I've seen so far do the following in the View Script:</p>
  
  <pre><code>&lt;td&gt;&lt;label for='textEmail'&gt;Email:&lt;/label&gt;&lt;/td&gt;
  &lt;td&gt;&lt;?php echo $this-&gt;element-&gt;textEmail; ?&gt;&lt;/td&gt;
  </code></pre>
  
  <p>I would like to find a way to have the text to be displayed in the label from the Form Object as well.</p>
  
  <pre><code>class RegisterForm extends Zend_Form {
  public function init () {
      $this-&gt;setAction('')
          -&gt;setMethod('post')
          -&gt;setAttrib('id','formRegister');
  
      $this-&gt;addElement('text', 'textEmail', array('label' =&gt; 'Email: '));
      $oEmail = $this-&gt;getElement('textEmail')
          -&gt;setRequired(true)
          -&gt;addFilter('StringTrim')
          -&gt;addValidator('EmailAddress');
      $oEmail-&gt;setDecorators(array('ViewHelper', 'Errors'));
  
      $this-&gt;setDecorators(array(array('ViewScript', array('viewScript' =&gt; 'forms/RegisterForm.phtml'))));
      }
  }
  </code></pre>
  
  <p>Above is how my Form Object is defined.
  Is anyone aware of how to access the defined label value?
  In the following format perhaps?</p>
  
  <pre><code>&lt;?php echo $this-&gt;element-&gt;textEmail-&gt;label; ?&gt;
  </code></pre>
  
  <p>Naturally that doesn't work. :p
  Thanks~</p>