From c059ca23ca0e3c9a5dc09565b0810867c6ffd946 Mon Sep 17 00:00:00 2001 From: Sebastian Castro <sebastian.castro@protonmail.com> Date: Tue, 4 May 2021 18:23:38 +0200 Subject: [PATCH] form_builder: checkbox backward compatibility --- templates/element-form/form-partials/checkbox.html.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/element-form/form-partials/checkbox.html.twig b/templates/element-form/form-partials/checkbox.html.twig index 1d09fa90b..3682d6e4a 100755 --- a/templates/element-form/form-partials/checkbox.html.twig +++ b/templates/element-form/form-partials/checkbox.html.twig @@ -1,7 +1,7 @@ <div class="checkbox-container"> <input type="checkbox" name="data[{{ field.name }}]" id="{{ field.name }}" {% if field.required|default(false) %}class="required"{% endif %} - data-checked-value="{{ field.checked_value }}" + data-checked-value="{{ field.checked_value|default('on') }}" {% if elementValue or not elementValue and field.defaultvalue == "yes" %}checked="checked"{% endif %}/> <label for="{{ field.name }}" class="to-html">{{ field.label|raw }}</label> </div> \ No newline at end of file -- GitLab