So, I said I'd include an HTML::Template example of my madness. Here is the additional code (to work, it needs to be added to the root node's code):

sub main_form { my $self = shift; # Format NEXTRMS the way H::T expects my @NEXTRMS = map +{NEXTRMS => $_}, @{$self->{__NEXTRMS}->{$self->get_current_runmode()} +}; $self->{template}->param(RUNMODE => $self->get_current_runmode(), HANDLER => (caller(1))[3], NEXTRMS => \@NEXTRMS, ); return $self->{template}->output(); } __DATA__ <html> <head> </head> <body> Runmode: <TMPL_VAR NAME=RUNMODE><br> Dispatched sub: <TMPL_VAR NAME=HANDLER> <form action="/cgi-bin/monktest.pl" method="POST" name="myform"> Test <input name="Test" type="text" /> <input name="_reset" type="reset" value="Reset" /> <TMPL_LOOP NAME=NEXTRMS> <input name="_submit" onClick="this.form._submit.value = this.value;" type="submit" value="<TMPL_VAR NAME=NEXTRMS>" /> </TMPL_LOOP> </form> </body> </html>
This produces (practically) identical output to the CGI::FormBuilder code. But I have a couple problems

I think I need to turn the 'run_mode' structure inside-out from how it is now.

Thoughts?

--Solo
--
Well, I suppose I could hotwire this thing.

In reply to Re: CGI::Application next run mode buttons? by Solo
in thread CGI::Application next run mode buttons? by Solo

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.