title: How to add a radio button to a form with Zend Framework?
body: <p>the issue is not so much as adding a radio button form element but how to i match it in my script format. It looks like there are multiple ways of doing things in zend.</p>
  
  <p>here is my script:</p>
  
  <pre><code> $this-&gt;addElement('text', 'time_from', array(
          'id' =&gt; 'datepicker',
          'class' =&gt; 'time_from',
          'filters' =&gt; array('StringTrim', 'StripTags'),
          'required' =&gt; true,
          'label' =&gt; 'Start Date of the Week: ',
          'value' =&gt; ''
      ));
  
      $update = $this-&gt;addElement('submit', 'update', array(
          'required' =&gt; false,
          'ignore' =&gt; true,
          'label' =&gt; 'Change Time'
              ));
  </code></pre>
  
  <p>based on this template, how do i add a radio button?</p>
  
  <p>i believe a logical approach would be to use something like this:</p>
  
  <pre><code>$this-&gt;addElement('radio', 'test', array(
              'label'=&gt;'Test Thing',
              'addMultiOptions'=&gt;array(
                  'male' =&gt; 'Male',
              'female' =&gt; 'Female'
              ),
      ));
  </code></pre>
  
  <p>but this doesn't display any radio buttons.</p>
  
  <p>I've also tried to replace  the :</p>
  
  <pre><code>'male' =&gt; 'Male',
  'female' =&gt; 'Female'
  </code></pre>
  
  <p>with and array, but i get all kind of errors:</p>
  
  <pre><code>array('male'=&gt;'Male', 'female'=&gt;'Female')
  </code></pre>
  
  <p>any ideas on how to do this?</p>
  
  <p>and , if is ot too much to ask maybe someone can explain why so many ways to do this forms and what is the common nominator in between them.</p>
  
  <p>thanks</p>