public function getInput() {
        $options = $this->htmlOptions;
        $options['class'] = (isset($options['class']) ? $options['class'] . ' ' : '') . 'input autocomplete';
        $options['autc_ajax'] = ($this->ajaxUpdate?'1':'0');
        $options['autc_url'] = $this->ajaxURL;
        $options['autc_for'] = str_replace(['[', ']'], '__', $this->getName());
        $options['autc_minletters'] = $this->minLettersToSearch;
        $options['autc_insert'] = ($this->allowNewValues?'1':'0');
        $this->ajaxExtraParams[WebApp::get()->request()->getCsrfKey()] = WebApp::get()->request()->getCsrfValue();
        $options['autc_extraparams'] = json_encode($this->ajaxExtraParams);
        $opts = [];
        foreach ($this->options as $word){
            $opts[] = "<li>$word</li>";
        }
        $opts = implode("", $opts);
        return Form::get()->hiddenInput($this->getName(), $this->getValue(), ['id' => str_replace(['[', ']'], '__', $this->getName())])
            . Form::get()->input("", "text", $this->getValue(), $options)
            . Html::get()->tag("div", "<ul>$opts</ul>", ['id' => 'options-for-' . $options['autc_for'], 'class' => 'form-autocomplete-list'])
            . Html::get()->scriptFile($this->form->getAssetsURL()  . 'autocomplete.js');
    }