chrism01 has asked for the wisdom of the Perl Monks concerning the following question:
This is a basic CGI qn I'm sure, but I don't know how to make it work.
I've got 2 forms, A & B, both of which work fine standalone (and both have a submit button). What I need to do is call B from A, passing a couple of params.
If I do this by adding B's code to the file containing A's code, or putting B in a perl module (my pref as there will be about 25 different form Bs to call) & clicking A's submit, then form B comes up fine and (in update mode) fills the fields from the DB.
However, ctrl seems to pass back to the calling form A in the background, such that when I click the submit button on form B (which is displayed), it actions the form A submit button, so the form B is not actioned(!).
I also tried using system() or exec() instead, but they just fail with 'unexpected end of headers' and don't even load B.
FYI, I'm using CGI::FormBuilder, but I believe this is a generic CGI qn; how do you use multiple forms, each with their own submit (pref separate code files for each)?
Cheers
Chris
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Basic CGI: 2 forms, 2 submits
by olus (Curate) on Feb 05, 2008 at 01:17 UTC | |
by chrism01 (Friar) on Feb 05, 2008 at 01:32 UTC | |
by olus (Curate) on Feb 05, 2008 at 02:11 UTC | |
by bradcathey (Prior) on Feb 05, 2008 at 03:21 UTC | |
by chrism01 (Friar) on Feb 05, 2008 at 04:16 UTC | |
Re: Basic CGI: 2 forms, 2 submits
by dsheroh (Monsignor) on Feb 05, 2008 at 01:17 UTC | |
Re: Basic CGI: 2 forms, 2 submits
by naikonta (Curate) on Feb 05, 2008 at 07:06 UTC |