[QF] Advanced Select

From: Date: Tue, 16 Mar 2004 01:39:52 +0000
Subject: [QF] Advanced Select
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-11312@lists.php.net to get a copy of this message
Hi, I'm just starting with PEAR and QF. My goal is to have an element (call it group if you want) composed of: - select (A) = list of people (very long) - select (B) = initially empty - add button = javascript copies selected item from (A) puts it in (B) - remove button = javascript deletes selected item in (B) The reason I need javascript is because i don't want to reload the page. I've written some code already which appears to work but is still a work in progress. I've got something along the following lines: <?
    $selectActorGroup[] = &HTML_QuickForm::createElement("select", "A", null,
                                array( "-99" => "Nobody is selected..."         )  ,
                                array("size" => "10", "style" => "" ) );
    $selectActorGroup[] = &HTML_QuickForm::createElement("button", "add", "add",
                          array("onclick" => "javascript:addPers()") );
    $selectActorGroup[] = &HTML_QuickForm::createElement("button", "remove", "remove",
                          array("onclick" => "removePers()") );
    $selectActorGroup[] = &HTML_QuickForm::createElement("select", "B", null, $selectValues,
                                array("size" => "10", "style" => "" ) );
    $form->addGroup($selectActorGroup, null, "Special Select:", "&nbsp;" );
?> + some java functions... Current Task: I want to customize the above into one single element/group, a bit like hierselect customize 2 select into one element. Question: has this kind of element/group been already done by someone? Seems to me it is fairly useful when one needs to select multiple entries from a very long list. The usability of a single select with multiple=true is not good enough. Question: is there a tutorial on how to do user-defined elements? is it in the doc and I've missed it? Thanks, EB. --

« previous php.pear.general (#11312) next »