title: Symfony form: testing widget breaks render of the widget
body: <p>if I test my widget with the following code the widget does not render; not html widget in my page; only the label html</p>
  
  <p>if I replace <code>{{ form_widget(form, {'attr': {'class': 'form-input form-choice form-checkbox'}}) }}</code> with a <code>dump</code> I get the dump displayed so the if statement works</p>
  
  <p>If I remove the if my widget is rendered so looks like the if statement is breaking the rendering ?</p>
  
  <pre><code>&lt;div class="custom-select"&gt;
       {% if 'checkbox' in (form_widget(form)) %}
           {{ form_widget(form, {'attr': {'class': 'form-input form-choice form-checkbox'}}) }}
       {% else %}
           {{ form_widget(form, {'attr': {'class': 'form-input form-choice'}}) }}
        {% endif %}
  &lt;/div&gt;
  </code></pre>