title: Bootstrap 3: formatted checkboxes with Symfony & Twig
body: <p>How to create a formatted group of checkboxes as described in the <a href="http://getbootstrap.com/css/#forms-controls">Bootstrap documentation</a> using the Symfony Form Factory and Twig?</p>
  
  <p>Using something like</p>
  
  <pre><code>&lt;div class="row"&gt;
    &lt;div class="col-lg-4"&gt;
      {{ form_label(form.sample) }}
    &lt;/div&gt;
    &lt;div class="col-lg-8"&gt;
      {{ form_widget(form.sample) }}
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>will not result in the needed output:</p>
  
  <p>a) each checkbox within a Bootstrap 3 structure like:</p>
  
  <pre><code>&lt;div class="radio"&gt;
    &lt;label&gt;
      &lt;input type="radio" ... /&gt;Option one
    &lt;/label&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>b) in addition the ability to output the checkboxes in two or more columns if needed:</p>
  
  <pre><code>&lt;div class="row"&gt;
    &lt;div class="col-lg-6 col-md-6"&gt;
      &lt;div class="radio"&gt; ... &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="col-lg-6 col-md-6"&gt;
      &lt;div class="radio"&gt; ... &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>