title: Displaying returned array as radio buttons
body: <p>I'm trying to display a set of radio buttons (male or female) on my index page. Within my Form I build the form like this:</p>
  
  <pre><code>public function buildForm(FormBuilderInterface $builder, array $options)
  {
      $builder
      -&gt;add('gender', ChoiceType::class, array(
          'choices'  =&gt; array(
              'Male' =&gt; 1,
              'Female' =&gt; 2,
          )));
  }
  </code></pre>
  
  <p>Then within the Controller:</p>
  
  <pre><code>public function indexAction(Request $request)
  {
      $participantEntry = new Participants();
  
      $form = $this-&gt;createForm(ParticipantsType::class, $participantEntry,[
          'action' =&gt; $request-&gt;getUri()
      ]);
  
      $form-&gt;handleRequest($request);
  
      return $this-&gt;render('SurveyBundle:Page:index.html.twig',
          ['form' =&gt; $form-&gt;createView()]);
  
  }
  </code></pre>
  
  <p>However, I'm not sure how to actually display as RadioButtons within my Twig file, this is what I've tried:</p>
  
  <pre><code>{% for g in form.gender %}
      {{ g.value }}
  {%  endfor %}
  </code></pre>
  
  <p>BTW: The $gender within my Entity is an int</p>
  
  <p>Which doesn't work, does anyone know what I am doing wrong?</p>