title: symfony collectiontype data-prototype output incomplete, only empty div rendered
body: <p>I have a UserType form that's used to edit User entities. Each User has a collection of Permission's which is managed through a CollectionType with</p>
  
  <pre><code>[ 'entry_type'=&gt;'PermissionType', 'allow_add'=&gt;true, 'prototype'=&gt;true ]
  </code></pre>
  
  <p>When a User object is loaded from Doctrine, the permissions are correct and they are displayed correctly when the view is rendered. When i render the permissions seperately as so:</p>
  
  <pre><code>                {%for R in form.permissions%}
                  {{form_widget(R)}}{{form_label(R)}}{{form_errors(R)}}
                  {%endfor%}
  </code></pre>
  
  <p>The data-attribute tag of my containing element is rendered as so:</p>
  
  <pre><code>data-prototype="{{form_widget(form.permissions.vars.prototype)|e}}"
  </code></pre>
  
  <p>But then the prototype only contains an empty div (but correctly named id).</p>
  
  <pre><code>data-prototype="&amp;lt;div id=&amp;quot;user_permissions___name__&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;"
  </code></pre>
  
  <p>The documentation states this:</p>
  
  <pre><code>If you render your whole "tags" sub-form at once (e.g. 
  form_row(form.tags)), then the prototype is automatically available on 
  the outer div as the data-prototype attribute, similar to what you see 
  above.
  </code></pre>
  
  <p>So i tried this approach too, and then the data-prototype attribute of the generated div contains a label as well:</p>
  
  <pre><code>data-prototype="&amp;lt;div&amp;gt;&amp;lt;label class=&amp;quot;required&amp;quot;&amp;gt;__name__label__&amp;lt;/label&amp;gt;&amp;lt;div id=&amp;quot;user_permissions___name__&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;"
  </code></pre>
  
  <p>The three PermissionTypes which are generated for my test case generate perfect output otherwise.</p>
  
  <p>So my question is: what could be the cause for my prototype not being rendered correctly? Did i uncover a bug perhaps? I also tried the case of rendering the complete form at once, same as the second case.</p>