Re: HTML_QuickForm_advmultiselect new feature or HTML_QuickForm request?

From: Date: Tue, 14 Jun 2005 16:50:41 +0000
Subject: Re: HTML_QuickForm_advmultiselect new feature or HTML_QuickForm request?
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-38123@lists.php.net to get a copy of this message
Laurent Laville wrote:
Hi Alexey, Bertrand In some situations, we have perharps need to give different attributes to each item (option) of a multiple select box. Of course, it's possible to do it with a bit of code and a loop thru the addOption() method of qf_select element. But i think it's not so easy. I propose, and i need your opinion, to add the ability to do it with the load method. Well, as a demo is better than a long chat, here are the feature i hope to have in action. and source code of my new demo (6) http://laurent-laville.org/?mod=pear&des=pepr&act=advmultiselect&show=source_ex6 In this demo, i've disabled the 'pear' fruit item, and gave a background color to tangerine. What i would like to do with such case ? Gave a list of values with one restriction (pear, is unavailable but it could be in an other case) and show a particular and important option (fruit). All is possible, because we can set all attributes we might want.
I was going to ask for that ;-) However, the advmultiselect doesn't handle that very well. Once moved, the item loses it CSS class. I wonder if there's a way to copy the select's option element instead of using the JS's "new Option()" statement. Maybe that would help preserve the CSS class attribute. I think it would be very useful when you use a different image background for each option to place some little icon in front. http://www.11abacus.com/dev/pear/HTML/QuickForm/icon_in_select_list.html -Philippe

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