From 0f1e9d0ce90560631d35dd27aa3db2f26f6964c7 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 1/1] 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