From d2e1d0e76e0b40fc3616c84da7ec4cfca5790e9a 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; }