Re: multiselect QuickForm and selected multiselect options
| From: | Dan Rossi | Date: | Tue, 28 Jun 2005 22:58:23 +0000 |
| Subject: | Re: multiselect QuickForm and selected multiselect options | ||
| References: | 1 2 3 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-19812@lists.php.net to get a copy of this message | ||
On 29/06/2005, at 2:21 AM, Justin Patrin wrote:
Ok there is obvious assumptions here, its prob good to actually write this down in the code, to me it would be setting the options of the second list with a similar array where it could be checking for the keys = option values, this is checking for the option value = array value not key. What the toHtml method is doing is using the same array and then doing a funky thing and removing the default values from the first list and putting them in the second list. I usually have to remove these values from the options array first, and then add the defaults array to the second list. Finally a standardise multiselect, i've done exact the same methods but in dodgy ways in the past, i converted immediately :DWell of course. The selected options (setDefaults) care nothing about the displayed value of an option. This is the same (AFAIK) as a normal multi-select.