Question

I'm working on PHP & Yii framework. Currently I found that filtering my data would be best fit with an HTML control that behave the same way as Gmail's label dropdown list does; e.g. the below screenshot.

The dropdown allow us to:

  1. Multiple selection
  2. Filter box to shorten the list based on keywords
  3. Command button allow to select/deselect all

Is it possible to archive that in Yii/PHP?

enter image description here

Was it helpful?

Solution

Your best bet is to search for a jQuery or similar plugin that will do the work for you and then wrap it in a component.

https://github.com/freshbooks/jquery-selectpicker

and

http://code.google.com/p/jaldropdown/

Are examples, but it depends on the exact implementation.

If you do a good job you could contribute the control back to the yii website for other people to use :)

OTHER TIPS

It's possible but I'm not aware of a widget in the core framework that does this.

If you can find the PHP/JS for a suitable control then you can easily write your own Yii widget that wraps it up for convenient use in your views.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top