I'm having trouble passing in default values to a form. How can I make
this work
I have a template:
[% USE mycgi = CGI %]
[% mycgi.header %]
[% INCLUDE header.tmpl
title = 'Recipe Interface'
%]
[% mycgi.start_form %]
[% mycgi.input( { type=>'text' name=>'stuff', value=>
mycgi.param('stuff') } ) %]
[% INCLUDE footer.tmpl %]
And Perl:
#session test
my $session_data = $self->session->param('stuff') || 1;
$session_data++; # reload the page to see the value change above
$self->session->param(stuff=>$session_data);
$q->param(name=>"stuff", value=>$session_data);
return $self->tt_process('recipe.tmpl');
---
This email is free from viruses and malware because avast! Antivirus protection
is active.
http://www.avast.com
_______________________________________________
templates mailing list
templates@template-toolkit.org
http://mail.template-toolkit.org/mailman/listinfo/templates