Posted by Owen Barton on September 10, 2011 at 11:23pm
This is a simple proof-of-concept module that provides 2 functions:
- An filter handler that extends string filter types and allows you to configure an autocomplete path (e.g. user/autocomplete) for an exposed filter. The exposed filter textbox will then autocomplete from that path. Note that the current implementation will replace all string filter handlers with this, but you should consider replacing only the specific ones you need, or building your own filters on top of this instead.
- A style plugin that extends views_json (part of the Views Datasource project) to allow you to produce your own autocomplete paths for any views query. The first field is used as the autocomplete "key", and the subsequent fields will be used as the "value" (comma separated if there is more than one). If there is only one field it will be used as both the "key" and "value". Note that for autocomplete to function you will need to ensure that the view results are filtered by the first view argument - you can do this by writing your own argument handler, or by using something like views argument filters (which will hopefully possible in native views at some point). Note that this path can be used with the autocomplete filter, or separately by your own Form API code.
Development of this module sponsored by the Mukurtu Archive.