title: Symfony2 radio-button group from Entity
body: <p>I wondered if there is a way to define the name of radio fields in twig for grouping. currently its this:</p>
  
  <pre><code>&lt;input type="radio" 
         value="6" 
         required="required"
         name="root_companybundle_company[products]"
         id="root_companybundle_company_products_6"&gt;
  </code></pre>
  
  <p>Where the name gets generated automatically.
  The best would be to define the name in the FormType element. like:</p>
  
  <pre><code>namespace Root\CompanyBundle\Form;
  
  use Symfony\Component\Form\AbstractType;
  use Symfony\Component\Form\FormBuilderInterface;
  use Symfony\Component\OptionsResolver\OptionsResolverInterface;
  
  use Doctrine\ORM\EntityRepository;
  
  class CompanyType extends AbstractType
  {
      public function buildForm(FormBuilderInterface $builder, array $options)
      {
          $builder
              -&gt;add('products', 'entity', array(
                  'class'    =&gt; 'CompanyBundle:Product',
                  'label'    =&gt; 'Produkts',
                  'property' =&gt; 'name',
                  'multiple' =&gt; true,
                  'expanded' =&gt; true,
                  'required' =&gt; true,
  
                  'groupBy' =&gt; 'groupName'
              ))
          ;
      }
  
      /**
       * @param OptionsResolverInterface $resolver
       */
      public function setDefaultOptions(OptionsResolverInterface $resolver)
      {
          $resolver-&gt;setDefaults(array(
              'data_class' =&gt; 'Root\CompanyBundle\Entity\Company'
          ));
      }
  
      /**
       * @return string
       */
      public function getName()
      {
          return 'root_companybundle_company';
      }
  }
  </code></pre>
  
  <p><code>groupName</code> would be a field(string) in my Product Entity. So it could look like this:</p>
  
  <pre><code>&lt;input type="radio" 
         value="6" 
         required="required"
         name="root_companybundle_company_mygroupName[products]"
         id="root_companybundle_company_mygroupName_products_6"&gt;
  </code></pre>
  
  <p>So I could easily get my radiobutton with  <code>{{ form_widget( new_form.products ) }}</code> instead of making a new radio group every time.</p>
  
  <p>I looked everywhere but didn't find anything. Is there a way?</p>