title: Symfony2 : accessing entity fields in Twig with an entity field type
body: <p>Here is my FormType :</p>
  
  <pre><code>public function buildForm(FormBuilder $builder, array $options)
  {
      $builder
          -&gt;add('user', 'entity', array(
              'class'   =&gt; 'UserBundle:User',
              'expanded' =&gt; true,
              'property' =&gt; 'name',
          ));
  }
  </code></pre>
  
  <p>Is there a way to access user's fields in the view (Twig) ?</p>
  
  <p>I'd like to do something like this :</p>
  
  <pre><code>{% for u in form.user %}
      {{ form_widget(u) }}
      {{ form_label(u) }}
      {% if u.moneyLeft &gt; 0 %}
      &lt;span&gt;{{ u.name }} : {{ u.moneyLeft }} €&lt;/span&gt;
      {% endif %}
  {% endfor %}
  </code></pre>
  
  <p>... where <em>moneyLeft</em> and <em>name</em> are fields from User entity.</p>