Subject: | popup_menu doesn't allow multiple default selections |
This is almost the same as
http://rt.cpan.org/Public/Bug/Display.html?id=30057 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>