diff --git a/lib/form/templatable_form_element.php b/lib/form/templatable_form_element.php index 7d8c2abb804..3ca1c63d295 100644 --- a/lib/form/templatable_form_element.php +++ b/lib/form/templatable_form_element.php @@ -81,6 +81,7 @@ trait templatable_form_element { $context['extraclasses'] = $extraclasses; $context['type'] = $this->getType(); $context['attributes'] = implode(' ', $otherattributes); + $context['emptylabel'] = ($this->getLabel() === ''); // Elements with multiple values need array syntax. if ($this->getAttribute('multiple')) { diff --git a/theme/boost/templates/core_form/element-template.mustache b/theme/boost/templates/core_form/element-template.mustache index aa077ba19dc..2588e2ce745 100644 --- a/theme/boost/templates/core_form/element-template.mustache +++ b/theme/boost/templates/core_form/element-template.mustache @@ -41,7 +41,7 @@ } } }} -