HTML_QuickForm_advmultiselect : The Definitive Guide |
There are two kind of sort with the advmultiselect element: The first one is only available by programming and allow an auto-arrange (alphabetic or reverse order) of each select list. The second is for user-end and allow them to sort their selection as they want.
Important | |
---|---|
These features required HTML_QuickForm_advmultiselect package version 0.5.0 or better. |
In some case, it could be interresting to have items lists sort alphabetically when elements are moved between them, rather than gets added to the bottom (default behavior).
To get both list sort alphabetically, you have to set the $sort
parameter of the
HTML_QuickForm_advmultiselect class constructor with the PHP
SORT_ASC
constant.
To get both list sort in reverse order, you have to set the
$sort
parameter of the
HTML_QuickForm_advmultiselect class constructor with the PHP
SORT_DESC
constant.
A full example is given in appendices. See the sort usage.
The other way to have your selection sorted is with help of two buttons: moveup to move an item to the top of the list, and movedown to move an item to the bottom of the list.
Note | |
---|---|
These buttons works only with the selection list |
A full example is given in appendices. See the sort usage.
HTML_QuickForm_advmultiselect : The Definitive Guide | v 1.4.0 : 9 Juin 2007 |