PHP Classes
elePHPant
Icontem

Moving List: Create select inputs and move items between them

Recommend this page to a friend!
  Info   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2004-03-16 (13 years ago) RSS 2.0 feedStarStarStarStar 61%Total: 2,225 All time: 1,716 This week: 783Up
Version License Categories
cmovinglist 1.0GNU General Publi...Content management
Description Author

This class is meant to assist in the creation of forms with pairs of multiple select inputs with buttons to move options between each of the select inputs.

This is useful to manage lists of values that are made of a limited set of known options.

The class does not generate the form inputs. It just generates the necessary Javascript code to associate to onclick events of form buttons that remove options from one select input and add them to the other.

Innovation Award
PHP Programming Innovation award nominee
March 2004
Number 4


Prize: One copy of the Zend Studio by Zend
Some times Web developers have solve the problem of building a list made of items that exist on another list.

For instance, if you want to classify an article for publication that may belong to multiple categories, once you associate the article to a given category, the category will move from the list of possible categories to the list of categories already associated with the article. If you want to remove the association of an article with a category, the opposite list movement needs to be executed.

The problem of implementing movements of items between two lists in a Web application is that the Web controls provided by common HTML forms do not provide an easy way to implement this kind of dynamic user interface manipulation.

The solution provided by this class is to generate Javascript code that can move items between two lists defined with multiple select inputs. The generated Javascript code can be associated to the onclick events of additional control buttons.

Although this solution could be implemented without the need to resort to Javascript, it would require additional form submissions to update the state of the lists, thus making the Web forms less usable.

Manuel Lemos
Name: Filippo Toso <contact>
Classes: 20 packages by
Country: Italy Italy
Innovation award
Innovation award
Nominee: 5x

  Files folder image Files  
File Role Description
Plain text file CMovingList.php Class Class file
Accessible without login Plain text file sample.php Example Sample script

 Version Control Unique User Downloads Download Rankings  
 0%
Total:2,225
This week:0
All time:1,716
This week:783Up
 User Ratings  
 
 All time
Utility:89%StarStarStarStarStar
Consistency:79%StarStarStarStar
Documentation:-
Examples:85%StarStarStarStarStar
Tests:-
Videos:-
Overall:61%StarStarStarStar
Rank:1162