in reply to Re^2: Basic CGI: 2 forms, 2 submits
in thread Basic CGI: 2 forms, 2 submits

chrism01, how about some code snippets? I spend all day in CGI forms and you've lost me with your prose explanation. Nothing like a little code to illustrate what you are doing.

I am curious, though: 1) how are you displaying/generating the HTML? and 2) how are you populating and then outputing B? (is that done in your Perl? or through some templating method?)

—Brad
"The important work of moving the world forward does not wait to be done by perfect men." George Eliot

Replies are listed 'Best First'.
Re^4: Basic CGI: 2 forms, 2 submits
by chrism01 (Friar) on Feb 05, 2008 at 04:16 UTC
    It's Perl & CGI::FormBuilder (as mentioned). Basically in script A you choose whether to create a new asset or update a known one, pass this info (using submit button) to new script (perl module) containing script B, which attempts to create or update asset as requested. Use B's submit button to insert/update DB.
    As standalone scripts they work, but I can't get it to work (as above) if I call B from A, which is the actual requirement.
    There's (will be) a form B for each asset type

    Anyway, here's the (awful) code. Sorry it's a bit long/messy, but I don't know enough to quickly make it any shorter.

    http://www.perlmonks.org/?viewmode=public;node_id=666195 my scratchpad