Hello.

I have a five form application being coded with CGI::Application and CGI::FormBuilder. @clients want delivery by tomorrow morning. After successfully dispatching from form1 to form2 to form3, I got stuck on attempts to dispatch to form4. Instead, it cycles back continuously to form2. (Even before @clients eliminated form1).

That was the first week. The second week was spent coding completely around that issue. Now practically eveything is in place, EXCEPT the dispatch from form3 to form4.

My form definitions include:

my $form = CGI::FormBuilder->new( ... ... ... keepextras => 1, ... ... ...
My dispatch logic looks like this:

my $output = ''; if ($form->submitted && $form->validate) { print STDERR "Confirm Registrant Needs Data. Store in db.\n"; print STDERR "->registrant_needs() about to invoke ->insert_reg_ne +eds_form().\n"; my $fields = $form->fields; $self->insert_reg_needs_form($dbh,$reg_id,$fields); $rm = "Checkout"; print STDERR "->registrant_needs() says about to dispatch to ->che +ckout().\n"; return $self->checkout($dbh,$reg_id); } else { print STDERR "Render Registrant Needs Form again.\n"; $output .= htmlgui::return_remote_header_as_string(@template_field +s); $output .= $self->config_param('RegistrantNeeds.pre_form_copy'); $output .= $form->render(); $output .= $self->config_param('RegistrantNeeds.post_form_copy'); $output .= $self->credits(); $output .= htmlgui::return_remote_footer_as_string(@template_field +s); $rm = "RegistrantNeeds"; print STDERR "->registrant_needs() says: about to render registran +t_needs form.\n"; } print STDERR "Script is ready to render: \n\n$output \n\n"; return $output;
So here is what is baffling me. Although from a gui browser, I watch it render the RegistrantNeeds form (form3), and cycle back to it (after resubmitting form2) with sticky data, I do not see my STDERR debug messages in my apache error log. I see no validation error messages and I see no evidence of having been dispatched with "return self->checkout($dbh,$reg_id);". There is no other code in the application which would render this form.

Any clues to help move me along would be greatly appreciated.

-- Hugh

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

In reply to Confused by Dispatch Issues w/ CGI::App and CGI::FormBuilder 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.