Download the PHP package otago/autocomplete-suggest-field without Composer
On this page you can find all versions of the php package otago/autocomplete-suggest-field. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download otago/autocomplete-suggest-field
More information about otago/autocomplete-suggest-field
Files in otago/autocomplete-suggest-field
Package autocomplete-suggest-field
Short Description Autocomplete Suggestion Field
License BSD-3-Clause
Informations about the package autocomplete-suggest-field
Ajax autocomplete suggestion field for SilverStripe
Use the 3.0 version for SilverStripe 3.*, and the 4.0 version for SilverStripe 4.*
Allows the user to select from a list of options while typing. It saves an ID against a field; be in Int, Text etc. Some handy use cases would be; selecting a CSS class from a large list, selecting a user from a remote API, or selecting a SilverStripe member when you have thousands of members.
Installation
Features
- Flexible autocomplete This fields lets a developer customize what goes into the autocomplete list. It populates an HTML5
- Friendly display names You can have a $has_one or $db living on a DataObject or Page, and display a friendly name instead of an ugly ID. This makes your code base tidier, lets you forget about having to force a many_many when you don't really need it, and allows your cms admins to not hate your face.
- Frontend and backend compatible the only requirement is jQuery. No entwine needed.
expose the JS files
Tests
Support
All modern browsers support this feature. older MSIE versions do not work
Basic example
The following will create a search field in the CMS. Note the logged in user has to have access to the Member object. Searching logic is handled by a controller which comes out the box with autocomplete-suggest-field.
custom search examples
Below shows how a developer can create custom search queries on the same file to return results
A more complicated example that pulls in data from an external API
Note the [id=>'', name=>''] JSON format