http://qs1969.pair.com?node_id=400844

bibo has asked for the wisdom of the Perl Monks concerning the following question:

Greetings monks, as I wave the white flag of surrender

I am going in circles trying to build a cgi form inside TemplateToolkit. I want the form action to return to the same runmode, or anywhere else for action processing, but no matter what I do, it goes back to the first runmode/web page.

[% INCLUDE header.tt2 %] #this is page3.tt2 [% USE CGI %] [% CGI.start_form(Action =>'/webapp/index.pl?rm=page3') %] viewer: [% CGI.textfield({Name => 'view' Value =>params.view Size => 10 Max +length => 10}) %]<br/> phone: [% CGI.textfield({Name => 'phone'Value => params.phone Size => 10 M +axlength =>10}) %]<br/> [% CGI.submit({Name => 'cm' Value => 'login' Class => 'grid'}) %] </form> [% INCLUDE footer.tt2 %]
Most items I put in the action section cause an empty html page to be rendered. This example works, but takes me back to index.tt2 instead of sticking at page3.tt2.

Attempts to code a form in perl in the pm-module which accompanies this tt2 app have had similar results. I had a similar form in HTML::Mason and had no problem making it come back to the same form for digesting the results, but my searches about Template::Toolkit and cgi forms have turned up no useful info.

UPDATE:I realized I forgot to mention I am running this under CGI::Application (the runmode comments give this point away)

thanks in advance

--bibo