title: Any reason why the choice_attr in Symfony3 ChoiceType can't set the id attribute?
body: <p>I have created a Symfony3 form class with the following ChoiceType element for my form:</p>
  
  <pre><code>-&gt;add('deg_certs', ChoiceType::class, array(
          'mapped' =&gt; false,
          'expanded' =&gt; true,
          'multiple' =&gt; true,
          'label' =&gt; 'Degrees/Certificates received:',
          'choices' =&gt; array(
                  'BA/BS' =&gt; 'ba_bs',
                  'AA/AS' =&gt; 'aa_as',
                  'Voc. Cert.' =&gt; 'voc_cert',
                  'Other' =&gt; 'other',
          ),
          'choice_attr' =&gt; function($val){
              return ['class' =&gt; $val];
          },
  ))
  </code></pre>
  
  <p>This works fine and sets the class attribute to the choice value. But I want to instead set the id attribute.</p>
  
  <p>I've tried this:</p>
  
  <pre><code>'choice_attr' =&gt; function($val){
      return ['id' =&gt; $val];
  },
  </code></pre>
  
  <p>Which I was expecting to work but doesn't.</p>
  
  <p>I also tried in my Twig template this:</p>
  
  <pre><code>{{ form_widget(form.deg_certs[3],
      {'attr':{'id':'deg_other',
      'onchange':'changeDegCertOther()',
      'style':'float:left'}}) }}
  </code></pre>
  
  <p>But that doesn't set the id attribute either. Note: the above is trying to set the id of the 3rd item in the choices in case you are not familar.</p>
  
  <p>This appears to be an issue with the Symfony3 code not supporting this. Can anyone confirm?</p>
  
  <p>The reason I want to set the id attribute, is because in my Javascript I want to use <code>getElementById</code> not <code>getElementsByClassName</code> (which gets an array).</p>