diff --git a/lib/form/autocomplete.php b/lib/form/autocomplete.php index 3d05905f86f..af58840bc54 100644 --- a/lib/form/autocomplete.php +++ b/lib/form/autocomplete.php @@ -245,6 +245,9 @@ class MoodleQuickForm_autocomplete extends MoodleQuickForm_select { $html = call_user_func($this->valuehtmlcallback, $value); if ($html !== false) { $option['html'] = $html; + if ($this->isFrozen()) { + $option['text'] = $html; + } } } }