Using CGI::Application I will be displaying several forms. Each form will need it's own run mode obviously, but when the user submits the form should the next step be it's own run mode as well. I.E. If I have a request_new mode for displaying a form to enter a new request, should there be another mode that will be executed when the form is submitted? Is this the way most of you would do it? I have read the documentation and this is what it recommends, but I want to check with you all to see if you normally do it a different way. I also did a search on "run mode" but nothing answered my question, unless I missed something.

An alternative I have thought of would be to re-use the same runmode, and check the value of the submit button which would tell me the user submitted the form. So each run mode function would handle displaying the form if the user has not submitted it, otherwise it would process the data.

I want to implement this the way most of you would do it because it will increase the probability that another Perl/CGI programmer will understand it immediately.

thanks, disciple

In reply to Question about designing a web app using CGI::Application by disciple

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.