duallistboxyii1

DualListBox wrapper of jQuery / Bootstrap Dual List Box
1 follower

It is a main wrapper of DualListBox. Bootstrap Dual List Box is a dual list box implementation especially designed for Bootstrap and jQuery. This control is quite easy for users to understand and use. Also it is possible to work with very large multi-selects without confusing the user.

Requirements

Yii 1.1 or above

Usage

In Controller

$personlist = Person::model()->findAll();
 
$criteria = new CDbCriteria;
$criteria->addCondition('is_paid=:paid');
$criteria->params = array(':paid' => 1);
$paidpersons = Person::model()->findAll($criteria);

In view

<?php
    $this->widget('ext.DualListBox.DualListBox', array(
        'model'=>$person,
        'attribute'=>'person_name',
        'nametitle' => 'Person',
        'data' => $personlist,  // it will be displyed in available side
        'selecteddata'=> $paidpersons, // it will be displayed in selected side
        'data_id'=> 'person_id',
        'data_value'=> 'person_name',
        'lngOptions' => array(
            'search_placeholder' => 'Person',
            'showing' => ' - Showing',
            'available' => 'Available',
            'selected' => 'Selected'
         )
    ));
?>

Resources

https://github.com/Geodan/DualListBox

Try out a demo

http://geodan.github.io/duallistbox/index.html

Be the first person to leave a comment

Please to leave your comment.

Create extension