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?

7 Years
Discussion Span
Last Post by Airshow

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


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.

<FORM ACTION="/bin/script_library/form_handler_mail" METHOD=POST ACTION="mailto:info@info.com">

<p>1.&nbsp;&nbsp; DCIS is an abbreviation for ____________.  <BR> 
                  <INPUT type=radio value="a" name="1">a. disease carcinoma in-situ<BR>
                  <INPUT type=radio value="b" name="1">b. ductal carcinoma in-situ<BR>
                  <INPUT type=radio value="c" name="1">c. ductal calcification in-situ<BR>
                  <INPUT type=radio value="d" name="1">d. ductal carcinoma invasive surgery</p>
                  <p>2.&nbsp;&nbsp;The goal of DCIS therapy is the prevention of recurrence of _________ and non-invasive cancer.<BR>  
                  <INPUT type=radio value="a" name="2">a. calcified<BR>
                  <INPUT type=radio value="b" name="2">b. pleomorphic<BR>
                  <INPUT type=radio value="c" name="2">c. invasive<BR>
                  <INPUT type=radio value="d" name="2">d. microcalcified</P>

<input type="submit" value="Submit" name="submit">                                                 
<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?

Edited by peter_budo: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.


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

?? about 1/3 chance sorry

<INPUT TYPE="hidden" NAME="end_display" VALUE="http://www.YOURLINK.com"> 
<INPUT TYPE="hidden" NAME="required" VALUE="field1,field2,field3">
<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


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).


This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.