Web Analytics Made Easy -
StatCounter Asp multiform - CodingForum

Announcement

Collapse
No announcement yet.

Asp multiform

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Asp multiform

    Hi all!!

    I´m working on a little webservice(who is not.....) where people can sign up and change thier address when moving. My problem is that i got 4 different form pages in .asp. The last page is a"preview"-page before submitting to a database. Since im not a pro on this.. i have trouble linking these page together and passing the info to the PREVIEW-page. I would be very happy if you guys could help me out here.

    Thanks!!
    Last edited by Mr Barcode; Mar 7, 2004, 05:47 PM.

  • #2
    Forgot the files
    Last edited by Mr Barcode; Mar 9, 2004, 07:50 AM.

    Comment


    • #3
      The basic method for having multi-page forms is that when submit the first form to the second page, it adds the values for the previous fields into hidden fields on the second. Then on the third it does the same, and so on until you get to your processing page.

      Does that make sense?
      OracleGuy

      Comment


      • #4
        Thanks.. Im with you.... but as i said before, im not a pro on this so if u or someone could help me out it would be great.

        Comment


        • #5
          inside move2.asp until move4.asp:

          Code:
          <form>
          <%
          for each item in request.form
            response.write "<input type=""hidden"" name=""" & item & """ value=""" & server.htmlencode(request.form(item)) & """ />" & vbCrLf
          next
          %>
          
          contents here...
          
          </form>
          Glenn
          vBulletin Mods That Rock!

          Comment


          • #6
            Thank you Glenn!!

            I´ll try it out.

            Comment


            • #7
              Glenn...

              Shall I put the whole code in the pre-built form, or shall i "make" a new form with your code?

              Comment


              • #8
                You should put it in the existing form so that it gets reposted when that form is posted. Otherwise that data won't make it to the next page.

                shmoove

                Comment


                • #9
                  well.. shall I include <Form> and </Form> ?

                  That should split the original form right?
                  Since I´m new on coding i need help and some advise to learn more.

                  <form>
                  <%
                  for each item in request.form
                  response.write "<input type=""hidden"" name=""" & item & """ value=""" & server.htmlencode(request.form(item)) & """ />" & vbCrLf
                  next
                  %>

                  contents here...

                  </form>

                  I understand the function in this code, but don´t know what and where to put in the code to get it going. You may all think i´m slow or something....

                  Ex. <input type=""hidden""name"""& item & "" value=""" & server.htmlencode(request.form(item)) & """ />

                  what changes do i have to make??

                  Comment


                  • #10
                    In every page you have a form where the user can enter extra information, right? So inside that form you put the for loop so that all the information from the previous pages is included as hidden fields in the form and passed on to the next page:
                    Code:
                    my html is a little rusty so forgive me any html errors
                    page1:
                    <form>
                    Enter your first name:<input type="text" name="firstname" value="" />
                    </form>
                    
                    page2:
                    <form>
                    Enter your last name:<input type="text" name="lastname" value="" />
                    <%
                    for each item in request.form
                    response.write "<input type=""hidden"" name=""" & item & """ value=""" & server.htmlencode(request.form(item)) & """ />" & vbCrLf
                    next
                    %>
                    </form>
                    
                    page3:
                    <form>
                    Enter your pet's name:<input type="text" name="petname" value="" />
                    <%
                    for each item in request.form
                    response.write "<input type=""hidden"" name=""" & item & """ value=""" & server.htmlencode(request.form(item)) & """ />" & vbCrLf
                    next
                    %>
                    </form>
                    shmoove

                    Comment


                    • #11
                      ok

                      How do i get the prewiev-page in the end?
                      Last edited by Mr Barcode; Mar 8, 2004, 05:04 PM.

                      Comment


                      • #12
                        Anyone???

                        Comment


                        • #13
                          Just request each form field from all the previous pages individually. Of course, you know what field names you used.

                          Name1:<%=request.form("name1")%>
                          Name2:<%=request.form("name2")%>
                          'and so on
                          Glenn
                          vBulletin Mods That Rock!

                          Comment


                          • #14
                            cant get it to work....

                            Comment


                            • #15
                              It's hard to help you without seeing your code and just hearing from you, "cant get it to work".
                              Glenn
                              vBulletin Mods That Rock!

                              Comment

                              Working...
                              X