I've been using HTML::FillInForm for ages now, but only in conjunction with HTML::Template and the cool plug-ing that comes with CGI::Application. Anyway, pulling from the docs:

my $output = HTML::FillInForm->fill( \$html, \%fifvalues);

If look at the above, note 3 main concepts:

  1. You need your HTML in a variable* (e.g., $html built by hand, CGI, or HTML::Template in your Perl script).
  2. You need the form value(s) in a variable (I always use a hash ref because I'm always pulling from a database, e.g., $fifvalues->{'gender' => 'male'}) assuming your radio button is named "gender" and one of the values is "male".
  3. Then you will need to print the $output, e.g., print "Content-type: text/html\n\n"; print $output;

So, forget checked, it will be done for you. But just try it, that's how I learned.

*Update: You can just reference an actual static html page with a form, negating the need to build it with the script.

—Brad
"The important work of moving the world forward does not wait to be done by perfect men." George Eliot

In reply to Re: HTML::FillInForm vs. checked by default checkboxes by bradcathey
in thread HTML::FillInForm vs. checked by default checkboxes by kappa

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.