문제

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

도움이 되었습니까?

해결책

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 :)

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top