PERL: my $q = new CGI; my $fvalues = $q -> Vars; #get all the value pairs from the submitted form my $name = "Mr.". $q->param('name'); #alter one of them $fvalues->{name} = $name; my $template = HTML::Template->new( filename => "../form.tmpl"); my $html = $template->output; my $form = new HTML::FillInForm; my $page = $form->fill(scalarref => \$html, fdat => $fvalues); print "Content-type: text/html\n\n"; print $page; HTML:



#### my $fvalues = $q -> Vars; my $name = "Mr.". $q->param('name'); #alter one of them my $template = HTML::Template->new( filename => "../form.tmpl"); $template->param( name = $name ); my $html = $template->output; #### my $fvalues = { address => '123 Main Street', choice => '2' }; #BTW, if the form tag is select with multiple attribute, use a reference to an array of the values: #my @choices = (1, 3); #$fifvalues->{'choices'} = \@choices; my $name = "Mr.". $q->param('name'); #alter one of them my $template = HTML::Template->new( filename => "../form.tmpl"); $template->param( name = $name ); my $html = $template->output;