mardi 17 novembre 2015

Bootstrap3 checkbox with symfony2

So straight to the point - my checkboxes looks terrible. Im new to symfony2 and twig so please be forgiving.

Im using bootstrap3 with twig.

So, the builder looks like:

->add('checkbox', 'checkbox', array(
                'label_attr' => array(
                    'class' => 'checkbox-inline'
                )
            ))

and in twig

{{ form_label(form.checkbox, 'Checkbox', {'label_attr': {'class': ''}}) }}
            {{ form_widget(form.checkbox, {'attr': {'class':''}}) }}
            {{ form_errors(form.checkbox) }}

Do i miss something? Even if i add the class(checkbox-inline) into form_label or form_widget, it still looks bad. The checkbox looks like this: one ugly checkbox

Thanks for your time.




Aucun commentaire:

Enregistrer un commentaire