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


In reply to TemplateToolkit and CGI Forms by bibo

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.