public function autocomplete(
        $name,
        $list = [],
        $selected = [],
        array $inputAttributes = [],
        array $spanAttributes = [],
        $inputOnly = false
    ) {
        // Forces the ID attribute
        $inputAttributes['id'] = $name.'-ms';
        if (!isset($inputAttributes['class'])) {
            $inputAttributes['class'] = 'multiselect';
        }

        // We will concatenate the span html unless $selectOnly is passed as false
        $spanHtml = $inputOnly ? '' : $this->span($name, $list, $selected, $spanAttributes);

        $inputAttributes = $this->attributes($inputAttributes);

        return $this->toHtmlString($spanHtml."<input type=\"text\"{$inputAttributes}>");
    }