title: Yii2 ActiveForm custom template for checkbox field
body: <p>I'm looking to use a template for my checkboxList.
  That's the properties i want to apply </p>
  
  <p><strong>class="switch" checked data-on-text="ON" data-off-text="OFF" data-on-color="teal"</strong>   </p>
  
  <pre><code>&lt;?php $form = ActiveForm::begin(); ?&gt; 
                              &lt;ul class="list-unstyled"&gt;
                                  &lt;li&gt;
                                      &lt;?= $form-&gt;field($modelUserPermission, 'id_permission')-&gt;checkboxList(ArrayHelper::map(Permission::find()-&gt;all(),'id', 'code')) ?&gt;
                                  &lt;/li&gt;&lt;br&gt;  
                             &lt;/ul&gt;
                          &lt;div class="form-group"&gt;
                              &lt;?= Html::submitButton($modelUserPermission-&gt;isNewRecord ? 'Create' : 'Update', ['class' =&gt; $modelUserPermission-&gt;isNewRecord ? 'btn btn-success' : 'btn btn-primary', 'value'=&gt;'Create', 'name'=&gt;'submit']) ?&gt;
                          &lt;/div&gt;
                      &lt;?php ActiveForm::end(); ?&gt;
  </code></pre>