Re: Help with extending HTML_QuickForm_select

From: Date: Sun, 06 Feb 2005 05:38:01 +0000
Subject: Re: Help with extending HTML_QuickForm_select
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-35969@lists.php.net to get a copy of this message
On Sat, 5 Feb 2005 11:48:51 +0100, Bertrand Mansion <bmansion@mamasam.com> wrote: > >> You can view an example of how this is currently working at > >> http://jalessio.com/pear/advmultselect.php and please > >> let me know if you > >> have any problems with this in your browser of choice. > >> > > > >I would suggest you instead have another (hidden) box with the > >selected values in it *and* selected. Or create a hidden element with > >the values for each selected value. This way you don't have to rely on > >an onsubmit. > > The hidden element idea sounds good but how would you make the result look like > an array once the form is submitted ? > Use another (hidden) multi-select whose name is the actual name of the element and select the options in it as they're moved to the "selected" box. So: multi-select 1 is the list of unselected options and should (techinally) not be submitted multi-select 2 holds the currently selected options, but they're not "selected" per se as th euse can do what they want. This should also (techinally) not be submitted. multi-select 3 is hidden and is named after the element (i.e. should be submitted). It should hold all of the selected options and the options should all be selected. This should be fairly easy to add. -- Justin Patrin

« previous php.pear.dev (#35969) next »