SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: multi-page form

  1. #1
    SitePoint Addict Kakarot720's Avatar
    Join Date
    Feb 2001
    Location
    Washington DC
    Posts
    219
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    multi-page form

    I have this really long paper form that I want to put on my website. The form is too long, so I want to break it down into 3 or 4 screens. How do I do this?

    I don't think a cgi script will handle this b/c there are too many variables to keep passing from page to page. I wasn't trying to use CF, PHP, or ASP b/c that would involve a database, but I'm starting to think that is my only way to go.

    Any suggestions, comments or answers?
    Last edited by Kakarot720; Sep 10, 2002 at 09:45.

  2. #2
    Drupaler bronze trophy greg.harvey's Avatar
    Join Date
    Jul 2002
    Location
    London, UK
    Posts
    3,258
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Perl will do it just fine, but I doubt there'll be a freebie script for it, so you'll need to know the language.

    But the easiest way to do it (whether you're using PHP, ASP, Perl or whatever) is to post the previous page's info into hidden form fields on the next page. Careful though. If you start trying to pass too much data at the end of the form then you might find it's being truncated.

    Therefore a better solution is a database ...

    G

  3. #3
    SitePoint Addict Kakarot720's Avatar
    Join Date
    Feb 2001
    Location
    Washington DC
    Posts
    219
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Greg,

    I definitely agree with you on the hidden input fields being truncated. Any idea at how many hidden input fields you can have before the server starts to truncate?

    Sounds like I wil be using a db though....

  4. #4
    Drupaler bronze trophy greg.harvey's Avatar
    Join Date
    Jul 2002
    Location
    London, UK
    Posts
    3,258
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I suspect it's not done in number of fields but number of bytes of data being sent. I'm not sure what the limit is, but I know we found it once by accident with an online application form ... oops!

    It may well vary from server to server.

    G

  5. #5
    SitePoint Zealot
    Join Date
    Aug 2002
    Location
    Bristol, UK
    Posts
    122
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could create a txt file, put all the data into each from each page as the user goes through, and then at the end it gets all the information and does whatever you want with it.
    You could use php sessions, and then use the session id as the name of the txt file
    Andy: Always Morphin Dwarfs


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •