Closed
Description
Hey,
I stumbled upon an issue with the form (error) rendering. This code snippet in the form_start
Twig block leads to bad form error rendering:
{% block form_start %}
{% spaceless %}
...
{% if form.vars.errors|length > 0 %}
{% set attr = attr|merge({ 'class': (attr.class|default('') ~ ' has-error')|trim }) %}
{% endif %}
The result is that all children are rendered as they have errors themselves, because the CSS from Bootstrap is simply
.has-error .help-block, ... {
color: #a94442;
}
I don't know if there's a reason behind adding that class to the form root as Bootstrap hasn't anything about that in their docs. I fixed this by overriding the Twig block and renaming the error class there.
Cheers
Matthias
Metadata
Assignees
Labels
No labels