in reply to Re: WWW:Mechanize::FormFiller documentation
in thread WWW:Mechanize::FormFiller documentation

You'll have to generate the HTML for the page and set the value of each form field using the value attribute for the tag. Escaping the data would also be a good idea, and maybe some kind of check to make sure the user didn't enter anything they shouldn't have.

I usually use HTML::Template to create my, um, HTML templates. The escapeHTML method in CGI should be good enough for escaping data. There might be some module that can do all of this for you, but I don't know about it off hand...

  • Comment on Re: Re: WWW:Mechanize::FormFiller documentation

Replies are listed 'Best First'.
Re: WWW:Mechanize::FormFiller documentation
by Feral_Shade (Novice) on Apr 16, 2003 at 04:06 UTC
    Ok, so all I have to do is take my originial forms and
    add something like value="<TMPL_VAR NAME=FIELD_VALUE>" to
    each input tag and then use the param() function to set each
    value. Wow, that really is a lot easier than trying
    to figure out how to use WWW::Mechanize::FormFiller. Thanks.
    I'll try not to clog up the forms with any more questions tonight :)
      Yep, much easier. ;-) You'll probably want to make the tag <TMPL_VAR NAME=FIELD_NAME ESCAPE=HTML> so that HTML is escaped. If it isn't escaped, it could lead to problems. Anyway, glad to help.
        Thanks again :)