On 6/26/07, Alex Malek <[EMAIL PROTECTED]> wrote:
> The problem is in HTML::Form.pm
> I had the same issue and I wrote a fix for Form.pm
> I am attaching it.
> Let me know if it helps.
> ---Alex
On 6/26/07, Paul Robbins <[EMAIL PROTECTED]> wrote:
What change did you make?

The problem is the way Form.pm deals with multiple form select options
with the same name.

I altered Form.pm to handle that case.

What you need to do is either replace Form.pm with the one I sent you
or put it in a place in your path where it is used first.

Below is the diff of the original Form.pm and and my new version.

 #select/option start code
<  last if $tag eq "/select";
 if ($tag eq "/select") {
 #some select/option end code
 $f->push_input("option", $attr);
 if ($attr->{START}) {
 delete $attr->{START}; #after first use remove
 #some select/option end code
 $f->push_input("option", $attr);
<  return $self->SUPER::add_to_form($form) unless $prev;
 # for option
 if ($type eq "option") {
 if ( defined $self->{START}) {
 return $self->SUPER::add_to_form($form);
 my $i=1;
 while ($prev && (! defined $prev->{START}) ) {
 $prev = $form->find_input($self->{name}, $self->{type}, $i++);
 if ( defined $prev->{START} && defined $self->{END}) {
 delete $prev->{START};
 return $self->SUPER::add_to_form($form) unless ($prev );

Reply via email to