So I've never used HTML::Form, but this question has gone unanswered for a while, so I'll take a crack at it. My apologies if I'm no help.

When you say that you're losing the inputs, do you mean that LWP is submitting a blank form, or that it submits the form, but you no longer have the inputs, which you may want to process locally (e.g. to label the response you get from the server)?

If it's that you want the form values to persist locally, it's probably easiest to set up a hash which is keyed by the value name.

The more likely case is that it's submitting a blank form. Now, I usually do this stuff by capturing a sample post and editing the header directly. In that case, I would use the post method as you do. Is it possible that you should be using one of LWP's three request methods? Check out http://kobesearch.cpan.org/htdocs/libwww-perl/LWP/UserAgent.html and try those out. If that still doesn't work, why don't you private message me, and I'd be happy to take a look at your full code. I have a not-so-busy day at work today, and I bet we can get this working.

Hays


In reply to Re: Re-submit HTML form including inputs by hgolden
in thread Re-submit HTML form including inputs by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.