passing in default cgi params

Bill McCormick <[email protected]> Thu, 20 Nov 2014 07:53:21 -0600
Newsgroups gmane.comp.lang.perl.modules.template-toolkit
Message-ID <[email protected]>
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