943,602 Members | Top Members by Rank

Ad:
Sep 24th, 2009
-1

web form data not being sent in order presented on actual form

Expand Post »
I have a web form with the usual personal info at the top, then questions 1 to 130 with 4 multiple choices for each question. When the form is sent , the data is not received in the order of the form. ie. Answers 1-130 are in the following order: 1, 11, 12, 13, 14....19, 2, 20, 21 ..... The personal information at the top is according to alphabetical order of the field name.

I'm not a programmer and just know enough about computers to be dangerous. I am using a simple script - no ASP.

Is there a simple solution to this?
Similar Threads
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
serendipity is offline Offline
58 posts
since May 2007
Sep 24th, 2009
0

Re: web form data not being sent in order presented on actual form

1 comes before 2
11 (one one) also comes before 2
like the personal information this IS sort by alphabet order of the field name

130 questions number
001 002 003... 009 010 011... 055 056 057... 128 129 130

without knowing which form processor script,
or without viewing the code,
no-one will be able to tell you what flag to turn off or if the sort can be turned off
you could use a consistent form labelling schema
Reputation Points: 562
Solved Threads: 367
Posting Maven
almostbob is offline Offline
2,970 posts
since Jan 2009
Sep 28th, 2009
0

Re: web form data not being sent in order presented on actual form

Thanks for replying. I have started to alphabetize the personal info at the beginning and it works. Thanks! But numerically I have about 120 questions with the data coming. That needs work.

I'm using CGI script. Below please find the beginning script, the script where user chooses an answer, and the end script.

html Syntax (Toggle Plain Text)
  1. <FORM ACTION="/bin/script_library/form_handler_mail" METHOD=POST ACTION="mailto:info@info.com">
  2.  
  3. <p>1.&nbsp;&nbsp; DCIS is an abbreviation for ____________. <BR>
  4. <INPUT type=radio value="a" name="1">a. disease carcinoma in-situ<BR>
  5. <INPUT type=radio value="b" name="1">b. ductal carcinoma in-situ<BR>
  6. <INPUT type=radio value="c" name="1">c. ductal calcification in-situ<BR>
  7. <INPUT type=radio value="d" name="1">d. ductal carcinoma invasive surgery</p>
  8.  
  9.  
  10. <p>2.&nbsp;&nbsp;The goal of DCIS therapy is the prevention of recurrence of _________ and non-invasive cancer.<BR>
  11. <INPUT type=radio value="a" name="2">a. calcified<BR>
  12. <INPUT type=radio value="b" name="2">b. pleomorphic<BR>
  13. <INPUT type=radio value="c" name="2">c. invasive<BR>
  14. <INPUT type=radio value="d" name="2">d. microcalcified</P>
  15.  
  16. <input type="submit" value="Submit" name="submit">
  17. <input type="reset" value="Reset" name="submit">

Also, is there any way when the form is submitted that the user can be taken to a specific web page rather than just a "Thank you" page?
THANKS!
Last edited by peter_budo; Sep 28th, 2009 at 2:03 pm. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
serendipity is offline Offline
58 posts
since May 2007
Sep 28th, 2009
0

Re: web form data not being sent in order presented on actual form

cgi scripts are often self documented
if you open them as text there are often instructions in them that show the configuration options
options are often entered as hidden inputs in the form so the script can handle multiple forms
but it depends on the form handler script
you will have to find the options for the particular script on your
"/bin/script_library/form_handler_mail"

?? about 1/3 chance sorry
html Syntax (Toggle Plain Text)
  1. <INPUT TYPE="hidden" NAME="end_display" VALUE="http://www.YOURLINK.com">
  2. <INPUT TYPE="hidden" NAME="required" VALUE="field1,field2,field3">
  3. <INPUT TYPE="hidden" NAME="email_to" VALUE="yourname@somewhere.com">
the last one is sort of important there can only be 1 action in a form
Reputation Points: 562
Solved Threads: 367
Posting Maven
almostbob is offline Offline
2,970 posts
since Jan 2009
Sep 29th, 2009
0

Re: web form data not being sent in order presented on actual form

You should never need to rely on the order in which form data appears in the POST/GET.

Server-side, you should (CGI?) be able to loop through with an incrementing counter (1 to 130), by which you access the POST/GET variables regardless of the order they were packaged/delivered.

This is certainly true of the server-side languages I have used, but this does not include CGI (I fixed/modified a few CGI scripts in the past but never became expert).

Airshow
Sponsor
Reputation Points: 300
Solved Threads: 357
WiFi Lounge Lizard
Airshow is offline Offline
2,523 posts
since Apr 2009

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in HTML and CSS Forum Timeline: Web form 3 questions: split answers, password protect, prevent copying
Next Thread in HTML and CSS Forum Timeline: same html and css- different size pages





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC