echosen This extension is a wrapper for Chosen JavaScript plugin which makes select boxes more user-friendly.

  1. Requirements
  2. Installation
  3. Using extension
  4. Resources
  5. Notes

EChosen is an extension for Yii framework. This extension is a wrapper for Chosen JavaScript plugin which makes long, unwieldy select boxes much more user-friendly. It is currently available in both jQuery and Prototype flavors.

Requirements

  • Yii 1.1 or above (tested on 1.1.8)
  • jQuery or Prototype

Installation

Move EChosen folder in your applications extensions folder (default: protected/extensions).

Using extension

Just place the following code inside your view file:

<?php $this->widget( 'ext.EChosen.EChosen' ); ?>

You can also change some default settings:

<?php $this->widget( 'ext.EChosen.EChosen', array(
  'target' => 'select',
  'useJQuery' => false,
  'debug' => true,
)); ?>
  • target jQuery selector for elements to apply this plugin to (default: .chzn-select)
  • useJQuery use jQuery framework on true, Prototype on false (default: true)
  • debug use un-minified .js of plugin (default: false)

You will also need to add chzn-select class to your select elements you want to apply this plugin or if you use jQuery framework you can just change the selector.

Resources

Notes

78 0
86 followers
4 190 downloads
Yii Version: 1.1
License: MIT
Category: User Interface
Developed by: ifdattic
Created on: Aug 11, 2011
Last updated: 12 years ago

Downloads

show all

Related Extensions