/** * Returns HTML for select form element. * * @return string */ function toHtml() { global $PAGE; // Enhance the select with javascript. $this->_generateId(); $id = $this->getAttribute('id'); $PAGE->requires->js_call_amd('core/form-autocomplete', 'enhance', $params = array('#' . $id, $this->tags, $this->ajax, $this->placeholder, $this->casesensitive, $this->showsuggestions)); return parent::toHTML(); }