Yii Framework Forum: Clistview Multiple Filters - Yii Framework Forum

Jump to content

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

Clistview Multiple Filters The user must be able to add/delete/clear multiple search filters. Rate Topic: -----

#1 User is offline   Skylight 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 8
  • Joined: 16-December 12

Posted 14 March 2013 - 08:25 PM

Hello,

I don't know if it's the right place for this topic but I am wondering if somebody can help me with this!

I would like to create a feature that allows the user to update the list view based on multiple filters ... the user must be able to clear or delete filters.

There are some images attached. I would like to replicate the feature exactly as it is shown on the images.

Is there something already implemented? Or which is the best way to implement it?
Thank you so much!
Johnny

Attached File(s)


0

#2 User is offline   anu1992 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 14
  • Joined: 29-October 12

Posted 26 March 2013 - 06:13 AM

have you find the solution?
If you can get the solution please share....
0

#3 User is offline   Skylight 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 8
  • Joined: 16-December 12

Posted 26 March 2013 - 07:09 AM

View Postanu1992, on 26 March 2013 - 06:13 AM, said:

are you find the solution?
If you can get the solution please share....


Yes, I've found the solution a few days ago ... my solution is a bit complicated as it's very customized but maybe I can help you with your requirements ... if you can describe what are you trying to do ..
0

#4 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 2,601
  • Joined: 10-October 10
  • Location:Denmark

Posted 26 March 2013 - 09:11 AM

/* moved from Tips, Snippets .. */
"Less noise - more signal"
0

#5 User is offline   anu1992 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 14
  • Joined: 29-October 12

Posted 26 April 2013 - 06:08 AM

View PostSkylight, on 26 March 2013 - 07:09 AM, said:

Yes, I've found the solution a few days ago ... my solution is a bit complicated as it's very customized but maybe I can help you with your requirements ... if you can describe what are you trying to do ..


Iam trying to implement multiple filtering with checkboxes and dropdown lists. Iam able to filter with single condition. But on multiple condition, it shows error.

<?php
Yii::app()->clientScript->registerScript('status', '
$(".status").change(function(){
        $.fn.yiiListView.update("request-list",{data:{status:$(this).val()}});    
        });
');
Yii::app()->clientScript->registerScript('maximum', '
$("#maximum").change(function(){
        $.fn.yiiListView.update("request-list",{data:{maximum:$(this).val()}});     
        });
');
Yii::app()->clientScript->registerScript('minimum', '
$("#minimum").change(function(){
        $.fn.yiiListView.update("request-list",{data:{minimum:$(this).val()}});     
        });
');
Yii::app()->clientScript->registerScript('category', '
$(".categoryFilter").change(function(){

        $.fn.yiiListView.update("request-list",{data:{category:$(this).val()}});
        
        });

');





Also Iam using cdb criterias like these to filter

 if(isset($_GET['validperd']))
                  {
                      $validperd1 = $_GET['validperd'];
                      $validperd=array($validperd1);
                          $criteria->addInCondition('request_validperiod', $validperd);
                  }


If you have any ideas pls share.. Iam stuck with this
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