|
|
|
Clear questions and runnable code get the best and fastest answer |
|
| PerlMonks |
Trying to understand how CGI::Prototype::Hidden, Template Toolkit and CGI.pm work together.by rlb3 (Deacon) |
| on Mar 09, 2005 at 14:52 UTC ( [id://438026]=perlquestion: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.rlb3 has asked for the wisdom of the Perl Monks concerning the following question: Hello, Iâve been experimenting with CGI::Prototype::Hidden and Iâm having a few troubles. And frankly, this might be more of a CGI.pm problem but Iâm not sure. Iâve been reading the docs and the code and I know I need to set a hidden _state param. In the docs the example is:
This generates something like this:
Btw, I overrode the default page to âSearchâ. My problem is that I want the value to be âDisplayâ so when I hit the submit button the app will move to the next page. So I tried this:
This gives a value of âSearchâ just like the first. If I hard code the hidden field it works as expected. What am I missing here? My second problem is with self.CGI.end_form. When I tried:
I get an ARRAY reference and not the text. I looked at the code in CGI.pm and it looks like that the end_form function returns an array or a scalar depending on context. How do I force scalar context in the Template Toolkit? Thanks to anyone who can help. rlb3
Back to
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||||||