473,396 Members | 1,892 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,396 software developers and data experts.

Handling large form submissions

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 will error check
whatever they send before it gets put in the database. I just want to do
pretty basic things, make sure numbers are really numbers, text length
doesn't go past the length specified in the database, etc.

My problem is, I'm stuck going through about 70 Request.Form("myvar") and
applying the checks. Makes for lots of coding i'd rather not waste my time
on.

Does anyone have any ideas for making this process faster?

Thanks
--Michael
Jul 19 '05 #1
3 2127
Michael wrote:
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 will
error check whatever they send before it gets put in the database. I
just want to do pretty basic things, make sure numbers are really
numbers, text length doesn't go past the length specified in the
database, etc.

My problem is, I'm stuck going through about 70 Request.Form("myvar")
and applying the checks. Makes for lots of coding i'd rather not
waste my time on.

Does anyone have any ideas for making this process faster?

Thanks
--Michael


Break the form up into smaller bits? You'll still need to write the code to
validate all 70, but there will probably be less impact on the user.
Consider this: the user inputs data into 65 of the input fields and
something happens before the form is submitted - the computer/browser
crashes, a power failure, etc. So now you have a frustrated user who has to
enter all 65 pieces of data again! Not cool.

Better would be to put related sections of the data into their own forms.
When the user hits continue,. the data from the smaller form gets saved
before going on to the next form. That way, if the process gets interrupted,
the user can start off where he left off, only having to re-enter a smaller
amount of data.

Bob Barrows

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jul 19 '05 #2
Make the names of your form fields significant. The method I use is as
follows:

fld t Firstname
fld t Lastname
fld n Age
fld d Birthdate

fld = this is a field I want to work with
t = text field
n = numeric field
d = date field

On form submit, it's a simple matter, then, to write a javascript loop that
looks for the "fld" and decides how to validate based on {t|n|d}. Error
messages are collected, concantenated together, then displayed at the end.
If there are no messages, the function returns true and the form submits.

This same method can be used server side to write insert and update sql
statements. Changes to forms require no rewrite of any of the processing
code as long as the new fields follow the convention.

- Wm
--
William Morris
Product Development, Seritas LLC

"Michael" <raterus@localhost> wrote in message
news:eW**************@TK2MSFTNGP10.phx.gbl...
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 will error check
whatever they send before it gets put in the database. I just want to do
pretty basic things, make sure numbers are really numbers, text length
doesn't go past the length specified in the database, etc.

My problem is, I'm stuck going through about 70 Request.Form("myvar") and
applying the checks. Makes for lots of coding i'd rather not waste my time on.

Does anyone have any ideas for making this process faster?

Thanks
--Michael

Jul 19 '05 #3
Michael, I like that idea. I've used the same idea for
forms where I have multiple checkboxs, etc. but never
thought about doing that for validation.

Thanks for the tip.
John
-----Original Message-----
Michael wrote:
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 will error check whatever they send before it gets put in the database. I just want to do pretty basic things, make sure numbers are really numbers, text length doesn't go past the length specified in the database, etc.

My problem is, I'm stuck going through about 70 Request.Form("myvar") and applying the checks. Makes for lots of coding i'd rather not waste my time on.

Does anyone have any ideas for making this process faster?
Thanks
--Michael
Break the form up into smaller bits? You'll still need to

write the code tovalidate all 70, but there will probably be less impact on the user.Consider this: the user inputs data into 65 of the input fields andsomething happens before the form is submitted - the computer/browsercrashes, a power failure, etc. So now you have a frustrated user who has toenter all 65 pieces of data again! Not cool.

Better would be to put related sections of the data into their own forms.When the user hits continue,. the data from the smaller form gets savedbefore going on to the next form. That way, if the process gets interrupted,the user can start off where he left off, only having to re-enter a smalleramount of data.

Bob Barrows

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my Fromheader is my spam trap, so I don't check it very often. You will get aquicker response by posting to the newsgroup.
.

Jul 19 '05 #4

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

Similar topics

0
by: Constandinos Mavromoustakis | last post by:
CFP: CLADE 2004-Challenges of Large Applications in Distributed Environments ------------------------------------------------- PhD student - Dept.Informatics at Aristotle University of...
6
by: nick4soup | last post by:
I have read the CGI FAQ 'How can I avoid users hitting "submit" twice' (on http://www.htmlhelp.org/faq/cgifaq.3.html#19 ) which essentially says you have to detect it at the server, using a...
0
by: Toby Inkster | last post by:
Like me, you are probably confronted with many requests for surveys, questionnaires, feedback forms, registration forms and so forth: forms where the processing requirements are very simple (store...
4
by: kschneider | last post by:
Assume there's a form with it's action attribute all set to post to a URL, but without a submit control. Form submission is done via a link and I want to prevent the classic "double submit"....
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:
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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.