title: Twig: remove div around each checkbox fields of a form
body: <p>Edit: see the solution I've found at the end of my question ;-) </p>
  
  <p>I'm looking since hours for a solution but I do not really find what I'like. I'm sure it is easy to do.</p>
  
  <p>I'm building a form with Symfony 3.1. My form does not send anything in a database. Everything seems okay. But when rendering my twig template all my checkbox are surrounded by a <code>&lt;div&gt;</code> html tag. </p>
  
  <p>I just would like twig renders me a form without that <code>&lt;div&gt;</code> tag.
  edit: this is what Twig render me: this is ok for me but I would like to remove  div tags</p>
  
  <pre><code>&lt;form name="form" method="post"&gt;
  &lt;div id="form"&gt;&lt;div&gt;&lt;label for="form_1"&gt;1&lt;/label&gt;&lt;input type="checkbox" id="form_1" name="form[1]" class="ballsCheckBox" value="1" /&gt;&lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Here is my twig template:</p>
  
  <pre><code>{% extends "::base.html.twig" %}
  
  {% block title %}SimulotoBundle:Lotto:lotto{% endblock %}
  
  {% block body %}
  &lt;h1&gt;Welcome to the Lotto:result page&lt;/h1&gt;
  {{form(form)}}
  
  {% endblock %}
  </code></pre>
  
  <p>I build the form directly in a controller. See it:
      public function LottoSimulationFormAction()</p>
  
  <pre><code>   {
          $lt = new LottoSimulation();
  
          $data = [];
  
          $formBuilder = $this-&gt;createFormBuilder($data);
  
          /** building Lotto grid with checkboxes * */
          for ($i = 1; $i &lt;= $lt-&gt;getMaxNb(); $i++)
          {
              $formBuilder-&gt;add($i, CheckboxType::class, [
                  'label' =&gt; $i,
                  'required' =&gt; false,
                  'attr' =&gt; [
                      'class' =&gt; 'ballsCheckBox'
                  ]
              ]);
          }
  
          /** adding submit button **/
          $formBuilder-&gt;add('Envoyer', SubmitType::class, [
              'attr' =&gt; [
                  'class' =&gt; 'save'
                  ]
              ]);
  
          $form = $formBuilder-&gt;getForm();
  
          return $this-&gt;render("SimulotoBundle:Lotto:lotto.html.twig", [
              "form" =&gt; $form-&gt;createview()
                  ]);
      }
  }
  </code></pre>