<div dir="ltr"><div dir="ltr"><div dir="ltr">Hi all,<div> I am using WWW::Mechanize with submit_form() to post a form.</div><div><br></div><div>The form has multiple values for the same field (ie. date = '1/1/12', date = '1/2/12', date = '1/3/12').<div><br></div><div>I am trying to work out how to remove the values (I want to send a scalar, not an array). I can reset them to blank, but then I end up submitting a array of blanks ('', '', '') rather than a scalar.</div></div><div><br></div><div>I've tried:</div><div>1. Using various invocations of $form->field() (eg. field(date => '1/1/12) and field(date => [ '1/1/12'])</div><div>2. Getting the form using $mech->current_form() and trying to play with the inputs ($form->inputs)</div><div>3. Using $form->param() (whose POD says it will reset the field if an arrayref is supplied)</div><div>(It seems that WWW::Mechanize's form methods are all wrappers around HTML::Form, so this is probably an HTML::Form problem really)</div><div><br></div><div>I can "reach inside" the module and empty inputs:</div><div>       $form->{inputs} = [];</div><div>but this is ugly and resets all the fields, I'd prefer to just reset the date field.</div><div><br></div><div>I feel like I'm missing something obvious, but this isn't an easy thing to Google for!</div><div><br></div><div>cheers,</div><div>-N</div></div></div></div>