1. Go to this page and download the library: Download paulredmond/chosen-cakephp library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
paulredmond / chosen-cakephp example snippets
// ...
CakePlugin::load('Chosen');
public $helpers = array(
'Chosen.Chosen',
);
public $helpers = array(
'Chosen.Chosen' => array(
'framework' => 'prototype',
'class' => 'chosen-custom', // Deselect-enabled class would be 'chosen-custom-deselect'
),
);
// One way in In default.ctp
echo $this->Html->script('jquery'); // sets src to /js/jquery.js