From cae63df7598dfc267c34c852e4884fb3edb0e10b Mon Sep 17 00:00:00 2001 From: Sebastian Gundersen Date: Thu, 12 Jun 2025 15:57:02 +0200 Subject: [PATCH] MDL-85773 forms: Read-only selects must have static labels This is to prevent labels with an invalid for attribute, referencing non-existing elements. --- lib/form/select.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/form/select.php b/lib/form/select.php index b4e0bd8ab2b..050ad014690 100644 --- a/lib/form/select.php +++ b/lib/form/select.php @@ -232,6 +232,7 @@ class MoodleQuickForm_select extends HTML_QuickForm_select implements templatabl } $context['options'] = $options; $context['nameraw'] = $this->getName(); + $context['staticlabel'] = $this->_flagFrozen; return $context; }