Re: multiselect QuickForm and selected multiselect options

From: Date: Tue, 28 Jun 2005 06:48:13 +0000
Subject: Re: multiselect QuickForm and selected multiselect options
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-19793@lists.php.net to get a copy of this message
On 28/06/2005, at 4:23 PM, Dan Rossi wrote:
Hi there, I asked this question before and the source doesnt tell me anything, how am I supposed to load the options for the second box of the multiselect element ? It can only managed to get the left box options ?? Let me know. -- PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Hey i debugged the source, to load options into the second select its via setDefaults however there is one catch i load options in a 2d array like $array[userID] = username; where userID is the primary key and username is the option text. However to seDefaults into the second select it requires the key to be the value :) So $arr[] = userID; array_push($arr,$userID); all works perfect top job ppl

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