Forums
This topic is locked
Help with creating one form on 3 pages.
06 Aug 2005 13:32:30 Malcolm X posted:
Hey there all. Im stuck here. I just cant figure out how to create a form that is on three pages. The idea was that as someone fills out a form, they select the next button to take them to the second page and then the same for the third page. When the third page is completed they select the send button and it sends all three pages in the one form. Is there some thing in DMX that links all the forms as one?? Help and thanks to all.MalSTAR.
Replies
Replied 07 Aug 2005 11:27:20
07 Aug 2005 11:27:20 Dave Thomas replied:
hi there,
you use 'hidden fields' for this in your form.
make your first page as normal,
set the action of the form to goto page 2,
do your page 2 form, then at the bottom, add hidden fields with sme names as corresponding boxes as on page 1,
same for page 3, but you need to add hidden fields for both pages 1&2. at least that's how i do it.
so something like
page1: (posted to page 2)
------------------------------
fName
fAge
page2: (post to page 3)
---------------------------
fAddress
fTelephone
fName (hidden)
fAge (hidden)
page3: (posted to the page that processes whatever you are doing)
---------------------------------------------------------------------------
fCity
fCountry
fName (hidden)
fAge (hidden)
fAddress (hidden)
fTelephone (hidden)
the hidden fields store the data as it's passed from page to page until you finally submit it to somewhere.
regards
Dave Thomas
<b>DMX Zone Manager</b>
you use 'hidden fields' for this in your form.
make your first page as normal,
set the action of the form to goto page 2,
do your page 2 form, then at the bottom, add hidden fields with sme names as corresponding boxes as on page 1,
same for page 3, but you need to add hidden fields for both pages 1&2. at least that's how i do it.
so something like
page1: (posted to page 2)
------------------------------
fName
fAge
page2: (post to page 3)
---------------------------
fAddress
fTelephone
fName (hidden)
fAge (hidden)
page3: (posted to the page that processes whatever you are doing)
---------------------------------------------------------------------------
fCity
fCountry
fName (hidden)
fAge (hidden)
fAddress (hidden)
fTelephone (hidden)
the hidden fields store the data as it's passed from page to page until you finally submit it to somewhere.
regards
Dave Thomas
<b>DMX Zone Manager</b>
Replied 08 Aug 2005 11:44:25
08 Aug 2005 11:44:25 Wayne Hultum replied:
You could also create sessions for the form fields, then use the session to populate the send script.
Replied 08 Aug 2005 18:50:35
08 Aug 2005 18:50:35 myke black replied:
or....
you could put all the form fields into 3 overlapping div layers, the first div layer is initially visible, then the 'Next' button hides the first layer, and shows the second layer with more form fields in it, then the second "next" button does the same - ie hides the second div layer and shows the final div layer, then the final button on the page submits the form. This way, you only need 1 form tag, lower server load since only one html page is loaded instead of 3, and also less server side coding, since all the form elements are on one page - no need to pass the results from one set of forms to another. Also your javascript error checking is a bit easier.
you could put all the form fields into 3 overlapping div layers, the first div layer is initially visible, then the 'Next' button hides the first layer, and shows the second layer with more form fields in it, then the second "next" button does the same - ie hides the second div layer and shows the final div layer, then the final button on the page submits the form. This way, you only need 1 form tag, lower server load since only one html page is loaded instead of 3, and also less server side coding, since all the form elements are on one page - no need to pass the results from one set of forms to another. Also your javascript error checking is a bit easier.
Replied 09 Aug 2005 04:17:29
09 Aug 2005 04:17:29 Malcolm X replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote> Heya, thanks for the suggestion. I tried using 'hidden fields' in the 2nd and third forms giving them names of all the 'text fields' and 'check boxes' in the previouse forms, but it came up with just the default names i put in.. Eg: 2nd form hidden text filed name "Company_Name". Value I tried typing the same name and even leaving it blank. I am I supposed to be inserting something else in the 'Value' field???.
Thanks heaps.
hi there,
you use 'hidden fields' for this in your form.
make your first page as normal,
set the action of the form to goto page 2,
do your page 2 form, then at the bottom, add hidden fields with sme names as corresponding boxes as on page 1,
same for page 3, but you need to add hidden fields for both pages 1&2. at least that's how i do it.
so something like
page1: (posted to page 2)
------------------------------
fName
fAge
page2: (post to page 3)
---------------------------
fAddress
fTelephone
fName (hidden)
fAge (hidden)
page3: (posted to the page that processes whatever you are doing)
---------------------------------------------------------------------------
fCity
fCountry
fName (hidden)
fAge (hidden)
fAddress (hidden)
fTelephone (hidden)
the hidden fields store the data as it's passed from page to page until you finally submit it to somewhere.
regards
Dave Thomas
<b>DMX Zone Manager</b>
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Thanks heaps.
hi there,
you use 'hidden fields' for this in your form.
make your first page as normal,
set the action of the form to goto page 2,
do your page 2 form, then at the bottom, add hidden fields with sme names as corresponding boxes as on page 1,
same for page 3, but you need to add hidden fields for both pages 1&2. at least that's how i do it.
so something like
page1: (posted to page 2)
------------------------------
fName
fAge
page2: (post to page 3)
---------------------------
fAddress
fTelephone
fName (hidden)
fAge (hidden)
page3: (posted to the page that processes whatever you are doing)
---------------------------------------------------------------------------
fCity
fCountry
fName (hidden)
fAge (hidden)
fAddress (hidden)
fTelephone (hidden)
the hidden fields store the data as it's passed from page to page until you finally submit it to somewhere.
regards
Dave Thomas
<b>DMX Zone Manager</b>
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>