Yii Framework Forum: New Multi Select Extension - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

New Multi Select Extension Multi select extension for selecting multiple choices Rate Topic: -----

#1 User is offline   miprabuddini 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 29-October 13

Posted 01 May 2014 - 11:26 AM

I have developed a new extension for the multi selection widget with the help of Multiselectable jQuery plugin. I hope it'll be useful for everyone. If there is any issue with this new widget please inform me.

Put this extension in extension folder.

Then add following code into your views.(Replace COLMID,COLMDESC with your required details)

<div class="multi">
<?php
$data= CHtml::listData($model::model()->findAll(),'COLMID', 'COLMDESC');
$this->widget('ext.IshMultiSelect.IshMultiSelect', array(
'model' => $model,
'listAttribute' => 'COLMDESC',
'data' => $data,
'listHtmlOptions'=> array(
'style'=>'display:block',
'multiple'=>'multiple',

),
));
?>
</div>
Attached File  IshMultiSelect.php (2.93K)
Number of downloads: 21
0

#2 User is offline   epulgaron 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 93
  • Joined: 19-February 14

Posted 25 June 2014 - 09:36 AM

I tested your extension, but I get the following error:"Undefined index: multiple", any idea?


View Postmiprabuddini, on 01 May 2014 - 11:26 AM, said:

I have developed a new extension for the multi selection widget with the help of Multiselectable jQuery plugin. I hope it'll be useful for everyone. If there is any issue with this new widget please inform me.

Put this extension in extension folder.

Then add following code into your views.(Replace COLMID,COLMDESC with your required details)

<div class="multi">
<?php
$data= CHtml::listData($model::model()->findAll(),'COLMID', 'COLMDESC');
$this->widget('ext.IshMultiSelect.IshMultiSelect', array(
'model' => $model,
'listAttribute' => 'COLMDESC',
'data' => $data,
'listHtmlOptions'=> array(
'style'=>'display:block',
'multiple'=>'multiple',

),
));
?>
</div>
Attachment IshMultiSelect.php

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users