Download the PHP package hypejunction/elgg_tokeninput without Composer
On this page you can find all versions of the php package hypejunction/elgg_tokeninput. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download hypejunction/elgg_tokeninput
More information about hypejunction/elgg_tokeninput
Files in hypejunction/elgg_tokeninput
Package elgg_tokeninput
Short Description Tokenizing autocomplete for Elgg
License GPL-2.0
Homepage http://hypejunction.com
Informations about the package elgg_tokeninput
Tokenizing Autocomplete for Elgg
Replacement for Elgg's core autocomplete and userpicker
Screenshots
Features
- User-friendly autocomplete and userpicker inputs
- Works with entities and meta tags
- Developer-friendly
- Single and multiple selection
- Free tagging
- Drag&Drop sorting of tokens
Notes
I/O
Default behavior of the JS plugin is to implode user input into a comma-separated string. PHP plugin hook for 'action', 'all' will attempt to explode these values and feed them back into an action for further processing. This however, will only work with basic form input names, e.g. If you are working with more complex forms, where e.g. , you will need to add some custom logic to your action.
AJAX requests
To initialize a tokeninput upon successfull AJAX request, use
Results and Token Format
Server Side
Use plugin hook to modify json output. You can add 'html_result' and 'html_token' parameters to customize the output.
Client Side
Use and hooks.
Examples
Example 1
Create an input that would allow users to search and select multiple files to be attached to an entity:
Add an input to the form:
Add a callback function:
In your action file:
Upgrades
To 4.x
-
elgg.tokeninput
library has been removed.elgg_load_library('elgg.tokeninput')
calls will WSOD, just remove them -
tokeninput/init
AMD module has been removed. Tokeninput is bootstrapped as needed on page load and on ajax requests. define('ELGG_TOKENINPUT_PAGEHANDLER', 'tokeninput');
has been removed. If you need to modify page handler identifier, unregister the page handler and register a new one
Attributions / Credits
- jquery.tokeninput http://loopj.com/jquery-tokeninput/