WWW-Mechanize - Re: submit_form() and checkboxes

Posted on Tue Mar 25 11:01:40 2008 by rajar in response to 2096 (See the whole thread of 3)
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.
Write a response