Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the CGI CPAN distribution.

Report information
The Basics
Id: 35376
Status: resolved
Priority: 0/
Queue: CGI

Owner: Nobody in particular
Requestors: wdhawes [...] (daily)

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

Subject: popup_menu doesn't allow multiple default selections
Download (untitled) / with headers
text/plain 896b
This is almost the same as and quite possibly the author of that ticket wanted the functionality described below. When you use popup_menu to create a select element that allows multiple selections, there is currently no way to specify in the function call that you want multiple items selected by default. The "default" argument only deals with a single value. I would suggest changing this so that passing an arrayref to the "default" parameter causes all supplied values to be selected if the popup menu has "multiple" set. $cgi->popup_menu( name => 'foo', values => [ 'one', 'two', 'three' ], default => [ 'one', 'two' ], multiple => 1 ); Ideally the above would produce something along the lines of <select name="foo" multiple="true"> <option selected="1">one</option> <option selected="1">two</option> <option>three</option> </select>
Fixed in version 3.39.
Subject: popup_menu doesn't allow multiple default selections (Should it?)
RT-Send-CC: lds [...]
Download (untitled) / with headers
text/plain 851b
On Fri May 23 05:16:59 2008, LDS wrote: Show quoted text
> Fixed in version 3.39.
Lincoln, I'm not sure this change have been made. I think there has been confusion here because HTML has "<select>", but has both popup_menu() and scrolling_list(). popup_menu() has been for single-select, and scrolling_list() for multi-select. So, the feature requested here had been intentionally admitted. If multi-select features are added to popup_menu() it will supercede and obsolete the scrolling_list() method, and might be better named something like Select(). My philosophy here is to apply minimal maintenance and changes to the HTML generation functions. In the case of popup_menu(), I suggest consider reverting the addition of any multi-select functionality, and instead enhance the documentation to explain that's what scrolling_list() is for. Mark
RT-Send-CC: lds [...]
Nevermind, we'll just leave popup_menu() alone now. Resolving.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to