in reply to multiple selections in the same field using Mechanize

Suggestions? thanks.

You can always use the DOM methods ? /duck :D

Ok, new suggestion

Instead of trying what you've tried, why not try what is documented?

http://search.cpan.org/perldoc/Win32::IE::Mechanize#$ie-%3Eset_fields%28_%arguments_%29

$pie -> set_fields( foo => [qw/ bar bar bar cab /];

Replies are listed 'Best First'.
Re^2: multiple selections in the same field using Mechanize
by Anonymous Monk on Dec 08, 2011 at 23:59 UTC
    Right. Well, being a bit new, I have trouble parsing what the documentation SAYS; I know enough to read it! But, what you suggest doesn't work. I end up with the field in the form being set to (only) the last entry in the list. It's not clear to me from the documentation that the IE Mech supports the multiple setting of a form field?

      Duuuuuuuuuh %~}

      I read that like 5 times, it is supposed to be

      $pie -> set_fields( foo => [qw/ bar 1/] , foo => [qw/ bar 2/] , foo => [qw/ bar 3/] , foo => [qw/ TAXI 4/] , );

      I guess that DOM suggestion wasn't such a joke

      What a stupidpainful interface , Win32::IE::Form - Mimic HTML::Form

      You (or the author, or both, ) should copy convenience methods from WWW::Mechanize, anything to get away from that HTML::Form verbosity, sheesh