Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Re: [pugdog] Using multiple forms to submit

Quote Reply
Re: [pugdog] Using multiple forms to submit In reply to
Ok, I've been trying to modify add.pm to allow the multiple pages to work, but I'm missing something. I've modified as follows:

Code:


sub handle {
# -------------------------------------------------------------------
# Display either an add form or process an add request.
#
if ($CFG->{user_required} and ! $USER) {
print $IN->redirect( Links::redirect_login_url ('add') );
return;
}


# We are processing an add request.
if ($IN->param('pg1')) {
my $results = GT::Plugins->dispatch ($CFG->{admin_root_path} . '/Plugins', 'user_add_link', \&add_link, {});
if (defined $results->{error}) {
print $IN->header();
print Links::SiteHTML::display ('pg2', $results);
}
}


if ($IN->param('pg2')) {
my $results = GT::Plugins->dispatch ($CFG->{admin_root_path} . '/Plugins', 'user_add_link', \&add_link, {});
if (defined $results->{error}) {
print $IN->header();
print Links::SiteHTML::display ('pg3', $results);
}
}




......and of course the rest goes on for several more pages like above


Of course I'm including pg1.html in the add.cgi template directory. If I separate the basic fields, ie Title, URL, etc.. and use several pages like this, it works but reports the error of not being able to submit without "whatever" and continues to scroll through. If I set it up with all of the basic fields on the first page, it reverts back to page 1 after hitting submit and its added to the database.

The additional pages I've included hidden fields to record the values as they are passed along, but I'm getting no where reall fast right now.

Thanks for any info,


Perl Hopefull
Subject Author Views Date
Thread Using multiple forms to submit stilton 4982 Oct 15, 2003, 9:02 AM
Thread Re: [stilton] Using multiple forms to submit
Andy 4854 Oct 15, 2003, 9:12 AM
Thread Re: [Andy] Using multiple forms to submit
stilton 4824 Oct 15, 2003, 7:23 PM
Thread Re: [stilton] Using multiple forms to submit
ManuGermany 4813 Oct 15, 2003, 11:33 PM
Thread Re: [ManuGermany] Using multiple forms to submit
stilton 4750 Oct 31, 2003, 1:56 PM
Thread Re: [stilton] Using multiple forms to submit
pugdog 4717 Nov 5, 2003, 8:04 AM
Thread Re: [pugdog] Using multiple forms to submit
stilton 4638 Dec 10, 2003, 6:12 PM
Thread Re: [stilton] Using multiple forms to submit
stilton 4625 Dec 10, 2003, 8:54 PM
Thread Re: [stilton] Using multiple forms to submit
stilton 4632 Dec 11, 2003, 7:28 AM
Thread Re: [stilton] Using multiple forms to submit
stilton 4619 Dec 11, 2003, 1:02 PM
Post Re: [stilton] Using multiple forms to submit
nakulgoyal 4610 Dec 16, 2003, 2:33 PM
Post Re: [stilton] Using multiple forms to submit
afinlr 4757 Nov 1, 2003, 12:39 PM