hesco has asked for the wisdom of the Perl Monks concerning the following question:
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 dispatch logic looks like this:my $form = CGI::FormBuilder->new( ... ... ... keepextras => 1, ... ... ...
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.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;
Any clues to help move me along would be greatly appreciated.
-- Hugh
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Confused by Dispatch Issues w/ CGI::App and CGI::FormBuilder
by samtregar (Abbot) on May 18, 2006 at 16:19 UTC | |
|
Re: Confused by Dispatch Issues w/ CGI::App and CGI::FormBuilder
by hesco (Deacon) on May 18, 2006 at 17:47 UTC | |
by samtregar (Abbot) on May 18, 2006 at 18:34 UTC | |
|
Re: Confused by Dispatch Issues w/ CGI::App and CGI::FormBuilder
by hesco (Deacon) on May 18, 2006 at 20:08 UTC |