public function autocomplete($fieldName, $options = []) {
		if (!is_array($options)) {
			$options = [];
		}
		$defaultOptions = $this->_getOptionsForElem('autocomplete.defaultOpt');
		$options = $defaultOptions + $options;
		$listExtraOptions = $this->_getOptionsForElem('autocomplete.extraOpt');
		$this->_prepareExtraOptions($options, $listExtraOptions, 'data-autocomplete-');

		if (!isset($options['data-autocomplete-url']) && !isset($options['data-autocomplete-local'])) {
			$options['data-autocomplete-url'] = $this->url(
				$this->ViewExtension->addUserPrefixUrl([
					'controller' => 'filter',
					'action' => 'autocomplete',
					'plugin' => 'cake_theme',
					'ext' => 'json',
					'prefix' => false
				])
			);
		}
		if (isset($options['data-autocomplete-local']) && !empty($options['data-autocomplete-local'])) {
			if (!is_array($options['data-autocomplete-local'])) {
				$options['data-autocomplete-local'] = [$options['data-autocomplete-local']];
			}
			$options['data-autocomplete-local'] = json_encode($options['data-autocomplete-local']);
		}

		return $this->text($fieldName, $options);
	}