so when I hit the submit button the app will move to the next page
The basic strategy there is that your submit button returns you to the same page, and in your "respond_per_page" method, you recognize the submit button and return the new page.

The whole point of "state" is that the dispatcher can figure out what code should be used to respond to a given form. So it isn't a form in a user's browser that changes state, it's the respond controller that changes state.

And yeah, that's a messy interaction between end_form and Template Toolkit. You have to add .join("") to the result of end_form. Feh. This will be clearer in the updated docs.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.


In reply to Re: Trying to understand how CGI::Prototype::Hidden, Template Toolkit and CGI.pm work together. by merlyn
in thread Trying to understand how CGI::Prototype::Hidden, Template Toolkit and CGI.pm work together. by rlb3

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.