title: Custom rendering of a "repeated" field from Symfony 2 in Twig
body: <p>I just started using Twig and I'm trying to build a registration form. To add a password/re-enter password field I use the "repeated" filetype:</p>
  
  <pre><code>-&gt;add('password', 'repeated', array(
      'type' =&gt; 'password',
      'invalid_message' =&gt; 'Passwords have to be equal.',
      'first_name'      =&gt; 'Password',
      'second_name'     =&gt; 'Re-enter password',
  ));
  </code></pre>
  
  <p>which works as intended. The problem I have however is that I want to add some custom classes etc. to my form. So my template looks like this:</p>
  
  <pre><code>&lt;form action="{{ path('register') }}" method="post" {{ form_enctype(form) }}&gt;
      {{ form_errors(form) }}
      {{ form_errors(form.username) }}
      &lt;div class="form-field"&gt;
          {{ form_label(form.username, null, { 'attr': {'class': 'form-label'} }) }}
          {{ form_widget(form.username, { 'attr': {'class': 'form-input'} }) }}
      &lt;/div&gt;
      {{ form_errors(form.email) }}
      &lt;div class="form-field"&gt;
          {{ form_label(form.email, null, { 'attr': {'class': 'form-label'} }) }}
          {{ form_widget(form.email, { 'attr': {'class': 'form-input'} }) }}
      &lt;/div&gt;
      {{ form_errors(form.password) }}
      &lt;div class="form-field"&gt;
          {{ form_label(form.password, null, { 'attr': {'class': 'form-label'} }) }}
          {{ form_widget(form.password, { 'attr': {'class': 'form-input'} }) }}
      &lt;/div&gt;
  
      {{ form_rest(form) }}
  
      &lt;input type="submit" class="contact-submit" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>this works fine for everything except for the password part. I want to render both fields seperately there, now they are just both rendered in the same div.</p>
  
  <p>How do I fix this? Is there a way to select the seperate fields in Twig? Or am I just doing something wrong because I encounter this problem in the first place.</p>