title: Get radio button value on form post in Zend Form
body: <p>i have an element of type Radio in <strong>zend form</strong> .
  how can i get value of radio button on form post.</p>
  
  <p>keep in mind i am using <strong>Zend Form</strong></p>
  
  <pre><code>if ($this-&gt;_request-&gt;isPost()) {
      if ($form-&gt;isValid($_POST)) {
          $values = $form-&gt;getValues();
      }
  }
  </code></pre>
  
  <p>i am already doing the above code it is really correct way to get values of posted elements but for radio button it only posts the last value of that radio button.
  for example: my radio button is like </p>
  
  <pre><code>$type = array("0"=&gt;"0", "1"=&gt;"1", "2"=&gt;"2")
  // add Order element
     $order = $this-&gt;CreateElement('Radio', 'order');
     $order-&gt;setMultiOptions( $type );
     $elements[] = $order;
  </code></pre>
  
  <p>then after post it always returns : order = 2</p>
  
  <p>On the other hand, if i use the same code while json = False like:</p>
  
  <pre><code>// ------------------------------------------------
  // prepare the form for ProductInfo
  // ------------------------------------------------
  $productinfo = new Form_ProductInfo();
  $this-&gt;view-&gt;productinfo = $productinfo;
  $this-&gt;view-&gt;productinfo-&gt;setAction($this-&gt;view-&gt;url());
  $this-&gt;view-&gt;jsonEncoded = false;
  </code></pre>
  
  <p>then it works fine &amp; pick selected radio button value.</p>