title: Symfony2 createFormBuilder
body: <p>This is probably easy question but I could not find answer on the official symfony2 documentation page.</p>
  
  <p>This is my form:</p>
  
  <blockquote>
  <pre><code>    $form = $this-&gt;createFormBuilder($task)
           -&gt;add('myInputField', 'text'))
           -&gt;add('myAnotherInputFiled', 'date', array(
               'widget' =&gt; 'single_text',
               'required' =&gt; false))
           -&gt;getForm();
  </code></pre>
  </blockquote>
  
  <p>Question is how to add attribute to the myInputField like "class" or "title"?</p>
  
  <p>I tried "...->add('myInputField', 'text', array('class' => 'CustomClass')..." but I get "the option "class" does not exist.</p>
  
  <p>I need to do it before its outputed in the view.</p>
  
  <p>For any help big thanks!</p>