HTML::Form and <select multiple="">

HTML::Form and <select multiple="">

am 15.09.2005 03:31:43 von Josh

Hi,

I noticed a change to HTML::Form::ListInput's add_to_form() method
between versions 5.79 and 5.800 of libwww-perl (revisions 1.39 and
1.44 of HTML/Form.pm) that I'm not sure was intentional. Previously,
a

was interpreted as a multiple select menu. In the newer versions, it
is not. As far as I can tell from the HTML specs, that's illegal HTML
(it should just be multiple, or multiple="multiple", or nothing). But
I think the old way that Form.pm interpreted it is more realistic, and
it conforms with the way I've seen it work on a couple of browsers.

This would be a patch for Form.pm revision 1.49 (libwww-perl-5.803):

1009c1009
< if ($type eq "option" && $self->{multiple}) {
---
> if ($type eq "option" && exists $self->{multiple}) {

Apologies if this has already been discussed -- I just joined the list
to put it out there.

Josh Rai

Re: HTML::Form and <select multiple="">

am 07.12.2005 10:36:33 von gisle

Josh Rai writes:

> I noticed a change to HTML::Form::ListInput's add_to_form() method
> between versions 5.79 and 5.800 of libwww-perl (revisions 1.39 and
> 1.44 of HTML/Form.pm) that I'm not sure was intentional. Previously,
> a
>
> was interpreted as a multiple select menu. In the newer versions, it
> is not. As far as I can tell from the HTML specs, that's illegal HTML
> (it should just be multiple, or multiple="multiple", or nothing). But
> I think the old way that Form.pm interpreted it is more realistic, and
> it conforms with the way I've seen it work on a couple of browsers.
>
> This would be a patch for Form.pm revision 1.49 (libwww-perl-5.803):
>
> 1009c1009
> < if ($type eq "option" && $self->{multiple}) {
> ---
> > if ($type eq "option" && exists $self->{multiple}) {

Thanks, applied. Will appear in LWP-5.805.

--Gisle