Hello,

I have been trying to set some hidden form fields with WWW::Mechanize,
but I get error that they are read only.
Is it a cannot-be-done case for all hidden input form fields? Does
anyone has some tips for me?

These fields are some times hidden, sometimes visible textfields.
Right now I am going around like this:

my $mech = WWW::Mechanize->new();
my $self = bless {}, $class;
$self->{mech} = $mech;
.........
$self->{aaa} = 'some text';
# these fields sometimes are hidden, don't want to set them if they
are hidden, because that causes error
$self->{mech}->field( 'aaa' => $self->{aaa}, ) if ($self->{aaa}) && !
grep { m'aaa'i } @hidden_fields;
# list @hidden_fields is populated at runtime

But if there is a way to set these hidden fields that would be
helpful. Thanks.

--Sumon.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to