Gossamer Forum
Home : Products : DBMan : Customization :

Multipage Mod

Quote Reply
Multipage Mod
Hi



The 'Multipage Mod' link does not work in Gossamer 'Resources in DBMan: Modifications: Page 2'.

Has someone got this mod ?



cheers



j
Quote Reply
Re: [jigme] Multipage Mod In reply to
i too would like this mod
Quote Reply
Re: [flymo] Multipage Mod In reply to
Check out LoisC's "unofficial FAQ" (see any of her posts for URL). The MOD may be there as well. I've done a multipage db, but be warned - it is a serious hack and you really have to be familiar with the dbman layout, etc.
Quote Reply
Re: [Watts] Multipage Mod In reply to
Yesterday I started modifying the html.pl & default.cfg files to set up a template for using multiple pages for entering information. It is designed so that you can build upon it (no extra mods added, no extra formatting, etc.)

I've still got some bugs to work out and documenting to do. I'm really trying to keep it simple so it can be expanded upon.

I'll post the default.cfg and html.pl files here when I'm done.
Quote Reply
Re: [Watts] Multipage Mod In reply to
Great Watts!

Looking forward to seeing it. The original if I remember correctly does require various other mods which may not be needed for basic use of the multipage and was very long and involved to make changes.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] Multipage Mod In reply to
Here is a MultiPage MOD that will let you span the input of your db over multiple pages. This is not a cut & paste MOD, but rather a base to build upon. It cannot be easily adapted into an existing dbman setup. It is best used for things like order forms and membership applications. For modifying or deleting you cannot search, you will have to "list all" and select which record to modify; however, for viewing you can search.
I've tried to comment the changes I've made, but if you are not familiar with dbman or html, you are going to have a hard time modifying this file.

Here is the basic way the file works:

Page One
--------------
hidden fields for pages 2 & 3
input fields for page 1

Page Two
-------------
hidden fields for pages 1 & 3
input fields for page 2

Page Three
-------------
hidden fields for pages 1 & 2
input fields for page 3

You are "adding" a record when you submit page 1, but modifying that same record when you submit pages 2 & 3 (unless you are modifying an existing record - then you are modifying all 3 pages).

I use META tags to take you from page to page. I don't show you the record that was just entered - instead I take you back to the "home" page, but you can change that if you want to, by changing the link for PageStatus=Done under modify_success. There is a lot of streamlining you can do, but if I did it then you'd have an even harder time trying to follow what I did.

Good Luck!

Last edited by:

Watts: Sep 4, 2002, 3:16 PM
Quote Reply
Re: [Watts] Multipage Mod In reply to
Hi Watts,

Found your Multipage Mod and it's just the ticket. I have adapted it to make a 7 page form. Everything is okay except that when adding or modifying a record it jumps from page 1 to 2, skips 3, jumps to 4, skips 5, jumps to 6, then to page 7.

As far as I can see this is what is happening:

Add record: Goes to page 1. The if ($in{'add_form'}) routine under page one then sets Page Status to 2 and you then proceed to modify_form from there on. Provided Meta tag for Page Status is set to 2 under the html_add_success subroutine then you do indeed go to page 2.

I have added to the if routines under html_modify_success for pages 1 through 7, in each case setting Page Status to next page

e.g.: if ($in{'PageStatus'} eq "2") {print qq|
<meta http-equiv = refresh content = "0; URL=$db_script_link_url&modify_form=1&PageStatus=3&ID=$in{'ID'}">
|;}

....

if ($in{'PageStatus'} eq "6") {print qq|
<meta http-equiv = refresh content = "0; URL=$db_script_link_url&modify_form=1&PageStatus=7&ID=$in{'ID'}">
|;}

if ($in{'PageStatus'} eq "7") {print qq|
<meta http-equiv = refresh content = "0; URL=$db_script_link_url&modify_form=1&PageStatus=7&ID=$in{'ID'}">
|;}

if ($in{'PageStatus'} eq "Done") {print qq|
<meta http-equiv = refresh content = "0; URL=$db_script_link_url">
|;}

However, alas Frown it always jumps 2 pages. (If you set Meta tag for Page Status to 3 under the html_add_success subroutine then you go from page 1 - 3 - 5 - 7).

Can you please help me?

My thanks in advance

Andy J
Quote Reply
Re: [andyJ] Multipage Mod In reply to
Sorry for the late response, my job has kept me so horribly busy (which is a good thing - in a way) that I've pretty much been relegated to "lurker" status. I'll check ou the html.pl and see if I can spot any bugs. It'll be a while (week or so) before I can devot any time to it though.
Quote Reply
Re: [Watts] Multipage Mod In reply to
Thanks for that !

I shall look forward to your feedback.

Regards,

Andy
Quote Reply
Re: [Watts] Multipage Mod In reply to
Also there is a better way to handle all of the hidden tags so they're not being duplicated...

See example posted below -

Notice how you only have to list your fields once? Of course if you are using numbers (1,2,3,4) then'll you have to take into account what happens when you get to 10, 11, 12 because they'd all match 1 (1*).
Quote Reply
Re: [Watts] Multipage Mod In reply to
I compared your file with the original, but I really didn't see anything obviously wrong. However I did notice two things:

1. On Page 7 your missing the hidden fields for page three (under html_record_form).

2. Under html_modify_success you have the following step commented out:

if ($in{'PageStatus'} eq "1") {print qq|<meta http-equiv = refresh content = "0; URL=$db_script_link_url&modify_form=1&PageStatus=2&ID=$in{'ID'}">|;}

Not sure if that could be the cause or not. Nothing else really jumped out at me... let me know what happens.
Quote Reply
Re: [Watts] Multipage Mod In reply to
Hi Watts.

Thanks for your feedback. I finally cracked it. I updated as per your 2 recommendations (although that didn't fix the problem of jumping pages 3 and 5).

The solution was to make changes in the html_modify_success sub as follows (set pagestatus to the same as current page). Not sure why but there is some circular thing going on and this seems to work:

###MULTIPAGE MOD: this keeps modify_success from displaying the page just entered and instead takes the user to the next appropriate page. Also displays a brief "please wait" message which I think is kinda cool.

if ($in{'PageStatus'} eq "1") {print qq|
<meta http-equiv = refresh content = "0; URL=$db_script_link_url&modify_form=1&PageStatus=2&ID=$in{'ID'}">
|;}

if ($in{'PageStatus'} eq "2") {print qq|
<meta http-equiv = refresh content = "0; URL=$db_script_link_url&modify_form=1&PageStatus=3&ID=$in{'ID'}">
|;}

if ($in{'PageStatus'} eq "3") {print qq|
<meta http-equiv = refresh content = "0; URL=$db_script_link_url&modify_form=1&PageStatus=3&ID=$in{'ID'}">
|;}

if ($in{'PageStatus'} eq "4") {print qq|
<meta http-equiv = refresh content = "0; URL=$db_script_link_url&modify_form=1&PageStatus=4&ID=$in{'ID'}">
|;}

if ($in{'PageStatus'} eq "5") {print qq|
<meta http-equiv = refresh content = "0; URL=$db_script_link_url&modify_form=1&PageStatus=5&ID=$in{'ID'}">
|;}

if ($in{'PageStatus'} eq "6") {print qq|
<meta http-equiv = refresh content = "0; URL=$db_script_link_url&modify_form=1&PageStatus=6&ID=$in{'ID'}">
|;}

if ($in{'PageStatus'} eq "7") {print qq|
<meta http-equiv = refresh content = "0; URL=$db_script_link_url&modify_form=1&PageStatus=7&ID=$in{'ID'}">
|;}

if ($in{'PageStatus'} eq "Done") {print qq|
<meta http-equiv = refresh content = "0; URL=$db_script_link_url">
|;}

print qq|
</head>


Your appreciatively,



AndyJ Blush