Hey folks:

I'm trying to wrap my head around how to integrate HTML::Template and CGI::FormBuilder to create a dashboard page which will include multiple components, charts and forms.

Right now my dashboard.cgi page includes an invocation of a module I've written reading:

$html .= $ymd->render_schedule_job_form();
The ->render_schedule_job_form() method use CGI::FormBuilder to collect and process some data. My $form object's constructor includes a:

template => $self->{'cfg'}->param("tmpl.tmpl_ScheduleJob"),
And it produces javascript which gets put in the header of the http response.

So far, so good.

Now to complicate things, my base template for the dashboard page is filled with <tmpl_include tags, some which also offer forms built with CGI::FormBuilder. Now what happens when they start competing over who gets to send the header and the javascript.

I'm having trouble understanding how to write this in a way which would avoid such conflicts. Any advise or pointers would be appreciated.

-- Hugh

if( $lal && $lol ) { $life++; }

In reply to Multi-form pages with CGI::FormBuilder and HTML::Template by hesco

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.