title: How to set a CSS ID attribute to a Symfony2 form input
body: <p>This question is similar to <a href="https://stackoverflow.com/questions/6734821/how-to-set-a-class-attribute-to-a-symfony2-form-input">another question</a>. There <a href="https://stackoverflow.com/questions/6734821/how-to-set-a-class-attribute-to-a-symfony2-form-input#answer-13358945">the solution</a> for setting the CSS class was to add it into the 3rd parameter of a call to FormBuilder::add():</p>
  
  <pre><code>-&gt;add('title', null, array('attr' =&gt; array('class'=&gt;'span2')))
  </code></pre>
  
  <p>Unfortunately, this does not work for setting the CSS id. When I do</p>
  
  <pre><code>-&gt;add('title', null, array('attr' =&gt; array('id'=&gt;'title-field')))
  </code></pre>
  
  <p>... this is ignored. The ID remains something like namespace_formtype_field.</p>
  
  <p>How can I set the CSS ID, if at all? </p>