title: Symfony2 - Get Form value, not key
body: <p>I'm new to Symfony2 (version 2.7) and I'm trying to get the value from a submitted form. Using <code>$form-&gt;getData()</code>, I get the index corresponding to the selected value in the list.</p>
  
  <p>For example, assuming $test is an array:</p>
  
  <pre><code>$form = $this-&gt;createFormBuilder($test)
  -&gt;add('abc', 'choice',
      array('choices' =&gt; array(
          '0' =&gt; 'option1',
          '1' =&gt; 'option2',
          '2' =&gt; 'option3'
      )))
  -&gt;getForm();
  $form-&gt;handleRequest($request);
  if ($form-&gt;isValid()) {
      $data = ($form-&gt;getData());
  }
  </code></pre>
  
  <p>Then, <code>$data</code> will be <code>1</code> if I select <code>option2</code>. 
  I've also tried to set <code>choices_as_values</code> to true, but then I got the array indexes in the drop-down list.</p>
  
  <p>What can I do to get <code>$data</code> equal to <code>option2</code> ?</p>