User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 422,643 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,743 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 668 | Replies: 1
Reply
Join Date: Nov 2007
Posts: 86
Reputation: sagedavis is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 6
sagedavis sagedavis is offline Offline
Junior Poster in Training

javascript required fields 290 form elements

  #1  
Jan 23rd, 2008
I am constructing survey page for a client, and it's getting extremely long winded.
There are 290 questions and all are required.
This means, typing out huge amounts of stuff, obviously, but, I was wondering if there was a sort of "easier" way to do this.
This survey is one of those types that, like 10 questions are asked, you go to the next page and 10 more questions are asked.

I have method post on these forms and using PHP to pass post values and send to hidden fields.

The database is not filled with the information until the very last page.

So far, I have all of that functionality figured out, but, I need to figure out how to make it so that, if the user skips a question, for them to be told so before going to the next page. Further, all previouse data needs to be saved, without using the database to store it.

The reason for this is because the user can not recieve a user id until finishing the survey.

Any sort of cheat script out there that says "check all fields and see if they aren't null"?

thanks in advance
Sage
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jun 2006
Location: India
Posts: 6,851
Reputation: ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold 
Rep Power: 23
Solved Threads: 344
Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Lazy, Useless & Apathetic

Re: javascript required fields 290 form elements

  #2  
Jan 24th, 2008
> Further, all previouse data needs to be saved, without using the database to store it.
Store the data in the user session using the server side language of your choice.

> I need to figure out how to make it so that, if the user skips a question
This can be done in two ways. One would be to use javascript for form validation and let the user know of any fields they have left out. Another one would be to do the entire thing server side.

The latter one is a much better approach since it would work even when the user has javascript disabled plus it allows you to have complete control over the data submitted. If you still decide to go with the first approach, there is always jsval.
I don't accept change. I don't deserve to live.

Happiness corrupts people.

Failing to value the lives of others cheapens your own.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb JavaScript / DHTML / AJAX Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 3:34 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC