Attention

TYPO3 v9 has reached its end-of-life September 30th, 2021 and is not maintained by the community anymore. Looking for a stable version? Use the version switch on the top left.

You can order Extended Long Term Support (ELTS) here: TYPO3 ELTS.

widget.autocomplete

Simple autocomplete widget.

Note

Make sure to include jQuery and jQuery UI in the HTML, like that:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/jquery-ui.min.js"></script>
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.3/themes/base/jquery-ui.css" type="text/css" media="all" />
<link rel="stylesheet" href="https://static.jquery.com/ui/css/demo-docs-theme/ui.theme.css" type="text/css" media="all" />

You can include the provided TypoScript template that includes the above snippet to the pages headerData.

Examples

Render lib object:

<input type="text" id="name" />
<f:widget.autocomplete for="name" objects="{posts}" searchProperty="author">

Output:

<input type="text" id="name" />

The input field and the required JavaScript for the Ajax communication. See Resources/Private/Templates/ViewHelpers/Widget/Autocomplete/Index.html

Arguments

customWidgetId

DataType

string

Required

false

Description

Extend the widget identifier with a custom widget id

objects

DataType

mixed

Required

false

Description

Objects to auto-complete

for

DataType

string

Required

false

Description

Property to fill

searchProperty

DataType

string

Required

false

Description

Property to search within when filtering list