title: Symfony: form_widget passing in a variable as the form field
body: <p>Is it possible to pass a variable to form_widget().</p>
  
  <p>I have some dynamic form fields which are generate inside formBuild.
  The only way I can retrieve these fields is if I use form_rest();</p>
  
  <p>Each record could have different fields so i cannot manually add in the fields.</p>
  
  <p>I have passed the field names from the controller into the view. Looped through the field names and trying to create the fields.</p>
  
  <p>See below as an example    </p>
  
  <pre><code>{% for meta_field in meta_fields %}
    {% set attr_field = 'form.'~ meta_field ~ '.metaValue' %}
      {{ attr_field }}
      {{ form_widget(attr_field) }}
    {% endfor %}
  </code></pre>
  
  <p>error below </p>
  
  <pre><code>An exception has been thrown during the rendering of a template ("Catchable Fatal Error: Argument 1 passed to Symfony\Component\Form\FormRenderer::searchAndRenderBlock() must be an instance of Symfony\Component\Form\FormView, string given, 
  </code></pre>