From cbcf57ea8955b72eec469837f993cc6350166847 Mon Sep 17 00:00:00 2001 From: Matthew Holmes Date: Mon, 2 Dec 2024 15:18:56 +0000 Subject: [PATCH] Set textarea value only when set. --- govuk_frontend_jinja/templates/components/textarea/macro.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/govuk_frontend_jinja/templates/components/textarea/macro.html b/govuk_frontend_jinja/templates/components/textarea/macro.html index 39f7a0f..ba9effa 100644 --- a/govuk_frontend_jinja/templates/components/textarea/macro.html +++ b/govuk_frontend_jinja/templates/components/textarea/macro.html @@ -48,7 +48,7 @@ {%- if params.disabled %} disabled{% endif %} {%- if describedBy %} aria-describedby="{{ describedBy }}"{% endif %} {%- if params.autocomplete %} autocomplete="{{ params.autocomplete }}"{% endif %} - {{- govukAttributes(params.attributes) }}>{{ params.value }} + {{- govukAttributes(params.attributes) }}>{%- if params.value %}{{ params.value }}{% endif %} {% if params.formGroup and params.formGroup.afterInput %} {{ params.formGroup.afterInput.html | safe | trim | indent(2) if params.formGroup and params.formGroup.afterInput.html else params.formGroup.afterInput.text }} {% endif %}