i have a form for which i'd have to pull out a bunch of popup menu name/value pairs (states and abbrevs, etc), but i really don't want to go through and create *another* version of this, since this client's stuff doesn't have a database.
here's the code from the script:
nice and simple, no? problem is, the selected state value isn't being preserved. all the other values are ... ( because i've hand-added <TMPL_VAR NAME='foo'> but not the 2 popup menus (which are hand-coded in the HTML).my $qry = CGI->new(); my $vars = $qry->Vars(); my $tmpl = HTML::Template->new( filename => $tmpls{$tmplName}, die_on_bad_params => 0, associate => $qry ); $tmpl->param( $vars ); my $msg = $tmpl->output(); print $qry->header, $msg;
am i misunderstanding the use of associate here? the value for USERSTATE ( the param name in this case ) is passed as part of the info in the $vars hashref ... but the same value isn't *technically* under the control of HTML::Template ( no TMPL_LOOP creating it, basically ).
In reply to HTML::Template, associate 'method', and popup menus by geektron
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |