From a2fe226a18cbc0532f2db322b51e0531b753798e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Wed, 11 Dec 2019 05:30:58 +0100 Subject: [PATCH] Add form global errors in a header block --- Resources/views/form/form_div_layout.html.twig | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Resources/views/form/form_div_layout.html.twig b/Resources/views/form/form_div_layout.html.twig index 7f73c51..dfc79b3 100644 --- a/Resources/views/form/form_div_layout.html.twig +++ b/Resources/views/form/form_div_layout.html.twig @@ -337,6 +337,13 @@ {%- if form_method != method -%} {%- endif -%} + {%- if errors|length > 0 -%} +
+
+ {{- form_errors(form) -}} +
+
+ {%- endif -%} {%- endblock form_start -%} {%- block form_end -%} -- 2.41.1