darkside666 / autocomplete
AutoComplete field add-on for Agile Toolkit (ATK4)
Installs: 2 324
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >=5.4
- atk4/atk4: *
This package is auto-updated.
Last update: 2025-01-08 07:28:23 UTC
README
#AutoComplete field add-on for Agile Toolkit 4.3+
This will replace standard drop-down field with an auto-complete field.
Requirement
- PHP >=5.4
- ATK4 >=4.3
Installing via Composer
The recommended way to install this add-on is through Composer.
# Install Composer curl -sS https://getcomposer.org/installer | php
Next, update your project's composer.json file to include AutoComplete:
{ "require": { "darkside666/autocomplete": "dev-master" } }
Usage
In your Frontend->init() add following lines:
// allow add-ons to reside in /vendor folder $this->addLocation(['addons' => ['../vendor']]) ->setBasePath($this->pathfinder->base_location->getPath()); // HACK: force call Initiator of all used add-ons :) foreach (['darkside666/autocomplete'] as $addon) { $this->add("$addon\Initiator"); }
And then you're ready to use this add-on like this:
// In model $model->hasOne('User')->display(['form'=>'darkside666/autocomplete/Basic']); // Or directly in form $field = $form->addField('darkside666/autocomplete/Basic'); $field->setModel('User');