Custom Form Autocomplete

Provides handlers for autocomplete widgets in custom forms.

Examples

- For taxonomy terms:

$form['taxonomy_term'] = [
    '#type' => 'textfield',
    '#title' => $this-t('Choose category')',
    '#autocomplete_route_name' => 'cf_autocomplete.taxonomy_term',
    '#autocomplete_route_parameters' => [
        'vid' => 'categories',
    ],
];

- For nodes: