http://www.perlmonks.org?node_id=991972


in reply to Re^2: HTML::Template with checkbox
in thread HTML::Template with checkbox

Oh, silly me. You don't provide a value attribute for your checkbox so nothing gets returned. You need something like:

<td><input type="checkbox" name="field" value="<TMPL_VAR NAME="fi +lename">">

for your checkbox line. That will return the file name if the checkbox is checked.

True laziness is hard work

Replies are listed 'Best First'.
Re^4: HTML::Template with checkbox
by bebewinla (Novice) on Sep 06, 2012 at 00:34 UTC

    how do you fetch the checkbox value ? I tried using q->param("field") it returns nothing, do you think the associate => $q is wrong when creating new template. should I take it out, but then how do I fetch the checkbox values

    $q = new CGI; $template = HTML::Template->new(filename => "$displaypage", associate => $q);

      Hope you got the answer by this time now