I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2006-04-03 17:57:35-07 by jeunice
submit_form() and checkboxes
I know how to use submit_form() to set normal text inputs. And I know how to use the tick/untick functions as part of a multi-function-call sequence. But I've tried a half-dozen invocations to get checkboxes set within the nearter submit_form() approach, yet none have worked. Have Google'd and RTFMed without luck. I give. What's the magic phrasing?
Direct Responses: 2098 | 7449 | Write a response
Posted on 2006-04-04 13:48:24-07 by cjaramilu in response to 2096
Re: submit_form() and checkboxes
to set the field call submit_form with the field set to the checkbox value.
Direct Responses: Write a response
Posted on 2008-03-25 09:01:40-07 by rajar in response to 2096
Re: submit_form() and checkboxes
Hi, Default value for a checkbox is 'on' and 'off' . So, you can simply try
mechanize->submit_form(form_name => 'environment_modify', fields => { 'envi +ronment_modify_add_host_essential_1' => 'on', }, );
"environment_modify_add_host_essential_1" is the checkbox and it is initially in 'off' state. When you turn it on it will be ticked. Thanks, Raja.
Direct Responses: Write a response