title: Pass custom data to Form Theme in Symfony/Twig
body: <p>I'm new to Symfony, currently working with 4.4, and am trying to implement a simple form theme for one specific form, i.e. the theme is in the same file as the form's <code>html.twig</code> file. I have my own <code>form_row</code> block and I'm trying to pass in custom data (an icon to use within the div) when calling it, so something like (this is highly summarised!):</p>
  
  <pre><code>{{ form_row(signUpForm.email, {
      attr: { placeholder: 'e.g. bobsmith@gmail.com' },
      icon: 'envelope'
  }) }}
  </code></pre>
  
  <p>then try to render in the form as</p>
  
  <pre><code>{%- block form_row -%}
  &lt;div&gt;
      {{ form_label(form) }}
      {{ form_widget(form, {attr: class: 'input'}) }}
      &lt;i class="icon {{ icon }}"&gt;&lt;/i&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I tried also passing icon via the formBuilder, along the lines of</p>
  
  <pre><code>$builder
      -&gt;add('email', EmailType::class, [
      'attr'=&gt; ['icon' =&gt; 'envelope']
  ])
  </code></pre>
  
  <p>but no joy. Surely this must be possible! Any assistance would be much appreciated. Thanks</p>