473,395 Members | 1,629 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Handling Large Forms

I am looking for a script or method of storing the data a user inputs
in our surveys (forms with 50-100 questions) in a cookie and then if
the user has to leave they can come back and the answers will
automatically be repopulated.

Currently this is a cumbersome process as I have to assign a value to
each form element, I was hoping to get something that would do it
automatically so I can apply it to all of the forms.

Thanks.

Feb 1 '07 #1
3 1143
Daz
On Feb 1, 7:32 pm, supremeoppres...@gmail.com wrote:
I am looking for a script or method of storing the data a user inputs
in our surveys (forms with 50-100 questions) in a cookie and then if
the user has to leave they can come back and the answers will
automatically be repopulated.

Currently this is a cumbersome process as I have to assign a value to
each form element, I was hoping to get something that would do it
automatically so I can apply it to all of the forms.

Thanks.

Hi.

I would suggest taking a different route, and using server-side
technology to store the information. If I remember correctly, cookies
are limited to about 4KB in size, each, and you usually won't see an
error when you exceed this limit. Also, I believe this limit varies
from browser to browser. Generall, most browsers only allow up to 300
cookies to be in storage at any one time. If the user clears their
cookies in the meantime, or happens to visit 300 fresh sites before
going back to yours, the information will be lost. Also, the
information stored in the cookies will be sent to your site with each
user retreives a page from your website. For users on dial-up, sending
4KB of cookies will take a very long time indeed.

The only other options you really have, would be to use a session (if
your server supports PHP). This relies on a cookie, and unless changed
from the default only keeps a stored session for 24 hours. Also, you
can use a database, but this would again rely on the user not having
deleted their cookie for your site, and it would be down to you to
manage when data is removed from the database, and how long it's kept
for.

If you used a database, you could easily link information to a user's
IP address. The catch here is that there can be more than one user on
a particular IP address, and also, this poses problems for users using
proxies. I think the best way to store user specific information, is
to use a website login. Not always convenient, but a darn sight more
reliable and secure.

Just my two cents.

Daz.

Feb 1 '07 #2
VK
On Feb 1, 10:32 pm, supremeoppres...@gmail.com wrote:
I am looking for a script or method of storing the data a user inputs
in our surveys (forms with 50-100 questions) in a cookie and then if
the user has to leave they can come back and the answers will
automatically be repopulated.

Currently this is a cumbersome process as I have to assign a value to
each form element, I was hoping to get something that would do it
automatically so I can apply it to all of the forms.
That is not a code to use, just a FYI of the coming way to do it:

<http://msdn.microsoft.com/library/de...rkshop/author/
behaviors/reference/behaviors/userdata.asp>

<http://developer.mozilla.org/en/docs/Session_restore_API>

<http://groups.google.com/group/comp....avascript/msg/
1536638f3531b242as a history note - the MDC article was re-written
rather radically since then.

Feb 1 '07 #3
Thanks for the info, I guess its not so much the process of storing
the data as it is recalling and populating the form.

Right now I have something like:

<input type=text name=question1 value="$_cookie[question1]">

so for each question i have to put a value in. I am trying to
eliminate that step so i can just write:

<input type=text name=question1and have a JS script pop the correct
value into the form for me.

On Feb 1, 2:13 pm, "VK" <schools_r...@yahoo.comwrote:
On Feb 1, 10:32 pm, supremeoppres...@gmail.com wrote:
I am looking for a script or method of storing the data a user inputs
in our surveys (forms with 50-100 questions) in a cookie and then if
the user has to leave they can come back and the answers will
automatically be repopulated.
Currently this is a cumbersome process as I have to assign a value to
each form element, I was hoping to get something that would do it
automatically so I can apply it to all of the forms.

That is not a code to use, just a FYI of the coming way to do it:

<http://msdn.microsoft.com/library/de...rkshop/author/
behaviors/reference/behaviors/userdata.asp>

<http://developer.mozilla.org/en/docs/Session_restore_API>

<http://groups.google.com/group/comp....avascript/msg/
1536638f3531b242as a history note - the MDC article was re-written
rather radically since then.

Feb 1 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Michael | last post by:
Does anyone have any ideas about how I can go about this faster. I have a large form that is being submitted, and from that a new row in a database will be created. I'm working on the page that...
7
by: Ori | last post by:
Hi, I would like to create some mechanism to handle all the exceptions which will happen in my application. I have one form which is the base form while all the other forms inherit from it. ...
1
by: lwickland | last post by:
Summary: System.Net.ScatterGatherBuffers.MemoryChuck allocates inordinately large bytes when sending large post data. The following application consumes inordinate quantities of memory. My code...
14
by: Al Smith | last post by:
I need help in implementing proper error handling. I am trying to upload a file based on the sample code below. The code works well except if the file selected is too big. I do know about the...
12
by: scsharma | last post by:
Hi, I am working on creating a webapplication and my design calls for creating main webform which will have menu bar on left hand side and a IFrame which will contain all the forms that are shown...
5
by: Jason MacKenzie | last post by:
I have a production critical windows forms application. I have try catch blocks everywhere to handle every eventuality. However occasionally, every couple of months, the application crashes. Its...
8
by: jcrouse | last post by:
I am using the following code to trap errors in a sub routine: Try Executable code Catch ex As Exception Dim strInputE As String = Application.StartupPath & "\Error.txt" Dim srE As...
0
by: Lysander | last post by:
Thought I would give something back with a few articles. This article is a bit of code to add error handling. When I have time, I want to write articles on multilingual databases, and Access...
2
by: nguyenminhhai | last post by:
Hi everyone, I'm reading "The C++ Programming Language" (Bjarne Stroustrup, 3rd edition). At page 193, he said "Doing error handling using the same level of abstraction as the code that caused the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.