From 32b10608edd30533b61ad8c47bbf09b24e9f161d Mon Sep 17 00:00:00 2001 From: Ana Cicconi Date: Sat, 23 May 2015 13:49:57 +0200 Subject: [PATCH 1/2] Bootstrap form theme and checkboxes --- cookbook/form/form_customization.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cookbook/form/form_customization.rst b/cookbook/form/form_customization.rst index 7d2c513c8ea..87aa62da84a 100644 --- a/cookbook/form/form_customization.rst +++ b/cookbook/form/form_customization.rst @@ -114,6 +114,13 @@ fragment needed to render every part of a form: but the CSS classes applied are the ones used to display the forms horizontally (i.e. the label and the widget in the same row). +.. caution:: + + If you use the Bootstrap form theme and want to render the parts of + a checkbox field individually, do not use the Twig function {{ form_label() }}. + Otherwise, it will render nothing. + + In the next section you will learn how to customize a theme by overriding some or all of its fragments. From e495337e8dbbd1232b9a72ba3b86de14e607324c Mon Sep 17 00:00:00 2001 From: WouterJ Date: Sun, 28 Jun 2015 16:23:27 +0200 Subject: [PATCH 2/2] Rewrite note a bit --- cookbook/form/form_customization.rst | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cookbook/form/form_customization.rst b/cookbook/form/form_customization.rst index 87aa62da84a..1d4c2a67b07 100644 --- a/cookbook/form/form_customization.rst +++ b/cookbook/form/form_customization.rst @@ -116,10 +116,9 @@ fragment needed to render every part of a form: .. caution:: - If you use the Bootstrap form theme and want to render the parts of - a checkbox field individually, do not use the Twig function {{ form_label() }}. - Otherwise, it will render nothing. - + When you use the Bootstrap form themes and render the fields manually, + calling ``form_label()`` for a checkbox/radio field doesn't show anything. + Due to Bootstrap internals, the label is already shown by ``form_widget()``. In the next section you will learn how to customize a theme by overriding some or all of its fragments.