mirror of
https://github.com/moodle/moodle.git
synced 2025-03-28 19:42:56 +01:00
When using the AJAX autocomplete field, it allows JavaScript to add custom HTML to selected options. For example, the user field from the assign roles page includes an icon and other information by the user's name. Once you submit the form and the page reloads, there was no way to provide this information back to the autocomplete field. HTML <option> tag was used for the value names but it may only contain text, not tags, so including it in the normal value did not work. This change adds a new option for the autocomplete field that lets you include HTML to override the default (text-only) value of the label used to represent each option.