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