diff --git a/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_layout.html.twig b/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_layout.html.twig
index dfb1965ca1..0fb3f769b8 100644
--- a/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_layout.html.twig
+++ b/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_layout.html.twig
@@ -3,7 +3,7 @@
{# Widgets #}
{% block form_widget_simple -%}
- {% if type is not defined or 'file' != type %}
+ {% if type is not defined or type not in ['file', 'hidden'] %}
{%- set attr = attr|merge({class: (attr.class|default('') ~ ' form-control')|trim}) -%}
{% endif %}
{{- parent() -}}
diff --git a/src/Symfony/Bridge/Twig/composer.json b/src/Symfony/Bridge/Twig/composer.json
index ba90af09a6..f1014098fe 100644
--- a/src/Symfony/Bridge/Twig/composer.json
+++ b/src/Symfony/Bridge/Twig/composer.json
@@ -22,7 +22,7 @@
"require-dev": {
"symfony/asset": "~2.8|~3.0",
"symfony/finder": "~2.8|~3.0",
- "symfony/form": "~2.8|~3.0",
+ "symfony/form": "~2.8.3|~3.0",
"symfony/http-kernel": "~2.8|~3.0",
"symfony/polyfill-intl-icu": "~1.0",
"symfony/routing": "~2.8|~3.0",
diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/form.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/form.html.twig
index 488974f7d4..d69e42ab40 100644
--- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/form.html.twig
+++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/form.html.twig
@@ -427,6 +427,10 @@
{% import _self as tree %}
+ {% if data.errors is defined and data.errors|length > 0 %}
+
{{ data.errors|length }}
+ {% endif %}
+
{% if data.children is not empty %}
{% else %}
@@ -434,10 +438,6 @@
{% endif %}
{{ name|default('(no name)') }} {% if data.type_class is defined %}[
{{ data.type_class|split('\\')|last }}]{% endif %}
-
- {% if data.errors is defined and data.errors|length > 0 %}
-
{{ data.errors|length }}
- {% endif %}
{% if data.children is not empty %}
diff --git a/src/Symfony/Component/Form/Tests/AbstractBootstrap3LayoutTest.php b/src/Symfony/Component/Form/Tests/AbstractBootstrap3LayoutTest.php
index 7f2de9529b..7512ea767b 100644
--- a/src/Symfony/Component/Form/Tests/AbstractBootstrap3LayoutTest.php
+++ b/src/Symfony/Component/Form/Tests/AbstractBootstrap3LayoutTest.php
@@ -687,7 +687,7 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
./input[@type="radio"][@name="name"][@id="name_1"][@value="&b"][not(@checked)]
]
]
- /following-sibling::input[@type="hidden"][@id="name__token"][@class="form-control"]
+ /following-sibling::input[@type="hidden"][@id="name__token"]
]
'
);
@@ -843,7 +843,7 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
./input[@type="radio"][@name="name"][@id="name_1"][@value="&b"][not(@checked)]
]
]
- /following-sibling::input[@type="hidden"][@id="name__token"][@class="form-control"]
+ /following-sibling::input[@type="hidden"][@id="name__token"]
]
'
);
@@ -879,7 +879,7 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
./input[@type="radio"][@name="name"][@id="name_1"][@value="&b"][not(@checked)][@class="foo&bar"]
]
]
- /following-sibling::input[@type="hidden"][@id="name__token"][@class="form-control"]
+ /following-sibling::input[@type="hidden"][@id="name__token"]
]
'
);
@@ -925,7 +925,7 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
./input[@type="radio"][@name="name"][@id="name_1"][not(@checked)]
]
]
- /following-sibling::input[@type="hidden"][@id="name__token"][@class="form-control"]
+ /following-sibling::input[@type="hidden"][@id="name__token"]
]
'
);
@@ -1007,7 +1007,7 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
./input[@type="radio"][@name="name"][@id="name_1"][not(@checked)]
]
]
- /following-sibling::input[@type="hidden"][@id="name__token"][@class="form-control"]
+ /following-sibling::input[@type="hidden"][@id="name__token"]
]
'
);
@@ -1052,7 +1052,7 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
./input[@type="checkbox"][@name="name[]"][@id="name_2"][@checked][not(@required)]
]
]
- /following-sibling::input[@type="hidden"][@id="name__token"][@class="form-control"]
+ /following-sibling::input[@type="hidden"][@id="name__token"]
]
'
);
@@ -1218,7 +1218,7 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
./input[@type="checkbox"][@name="name[]"][@id="name_2"][@checked][not(@required)]
]
]
- /following-sibling::input[@type="hidden"][@id="name__token"][@class="form-control"]
+ /following-sibling::input[@type="hidden"][@id="name__token"]
]
'
);
@@ -1264,7 +1264,7 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
./input[@type="checkbox"][@name="name[]"][@id="name_2"][@checked][not(@required)]
]
]
- /following-sibling::input[@type="hidden"][@id="name__token"][@class="form-control"]
+ /following-sibling::input[@type="hidden"][@id="name__token"]
]
'
);
@@ -1766,7 +1766,7 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
'/input
[@type="hidden"]
[@name="name"]
- [@class="my&class form-control"]
+ [@class="my&class"]
[@value="foo&bar"]
'
);