title: form render custom symfony2
body: <p>hi i am trying to make a form with validations.</p>
  
  <p>I have this form:</p>
  
  <pre><code>&lt;form  class="formulario" id="modificarmedico" action="{{ path('medico_update', { 'id': entity.id }) }}" method="post" {{ form_enctype(edit_form) }}&gt;
      &lt;div id="mio_miobundle_medicotype"&gt;
      {{ form_row(edit_form.username) }}
      {{ form_row(edit_form.dni) }}
      {{ form_row(edit_form.nombre) }}
      {{ form_row(edit_form.apellido1) }}
      {{ form_row(edit_form.apellido2) }}
      {{ form_row(edit_form.localidad) }}
      {{ form_row(edit_form.provincia) }}
      {{ form_row(edit_form.direccion) }}
      {{ form_row(edit_form.email) }}
      {{ form_row(edit_form.telefono) }}
      {{ form_row(edit_form.movil) }}
      {{ form_row(edit_form.titulacion)}}
      {{ form_row(edit_form.numero)}}
      {{ form_row(edit_form.fechaalta)}}
      {{ form_row(edit_form.idioma)}}
      {{ form_row(edit_form.tema)}}
      {{ form_row(edit_form.color)}}
      {% if is_granted('ROLE_A') %}
          {% if entity.id == app.user.id %}
          {{ form_row(edit_form.password) }}
           {{ form_errors(form.password) }}
              &lt;div class="empoculto"&gt; 
                  {{ form_row(edit_form.activo) }}
                  {{ form_row(edit_form.generar) }}
              &lt;/div&gt;
          {% else %}
          {{ form_row(edit_form.generar) }}
          {{ form_row(edit_form.activo) }}
          &lt;div class="empoculto"&gt;
              {{ form_row(edit_form.password) }}
          &lt;/div&gt;
          {% endif %}
      {% else %}
           {{ form_row(edit_form.password) }}
           {{ form_row(edit_form.password) }}
          &lt;div class="empoculto"&gt;
          {{ form_row(edit_form.generar) }}
          {{ form_row(edit_form.activo) }}
          &lt;/div&gt;
          {% endif %}
  </code></pre>
  
  <p>but the password errors shows me outside the div. not so with the other fields:</p>
  
  <pre><code>&lt;div&gt;
     &lt;label for="mio_miobundle_medicotype_movil" class=" required"&gt;Móvil&lt;/label&gt;
     &lt;ul&gt;
        &lt;li&gt;El campo debe tener 9 números.&lt;/li&gt;
        &lt;li&gt;El campo debe tener sólo números.&lt;/li&gt;
     &lt;/ul&gt;
     &lt;input type="text" id="mio_miobundle_medicotype_movil" name="mio_miobundle_medicotype[movil]" required="required" maxlength="9" value="fgadfg" /&gt;
  &lt;/div&gt;
  &lt;div&gt;&lt;label for="mio_miobundle_medicotype_color" class=" required"&gt;Color*&lt;/label&gt;&lt;input type="text" id="mio_miobundle_medicotype_color" name="mio_miobundle_medicotype[color]" required="required" value="#1153ed" /&gt;&lt;/div&gt;
  &lt;ul&gt;
     &lt;li&gt;Las contraseñas deben ser iguales.&lt;/li&gt;
  &lt;/ul&gt;
  &lt;div&gt;&lt;label for="mio_miobundle_medicotype_password_Nueva contraseña" class=" required"&gt;Nueva contraseña&lt;/label&gt;&lt;input type="password" id="mio_miobundle_medicotype_password_Nueva contraseña" name="mio_miobundle_medicotype[password][Nueva contraseña]" required="required" /&gt;&lt;/div&gt;
  &lt;div&gt;&lt;label for="mio_miobundle_medicotype_password_Repite contraseña" class=" required"&gt;Repite contraseña&lt;/label&gt;&lt;input type="password" id="mio_miobundle_medicotype_password_Repite contraseña" name="mio_miobundle_medicotype[password][Repite contraseña]" required="required" /&gt;&lt;/div&gt;
  </code></pre>
  
  <p>i tried form_bubbling symfony2 but not solve my problem.
  thanks.</p>