Input form question.

by Floyd Baker <fbaker(at)olm1.com>

 Date:  Wed, 27 Nov 2002 12:00:11 -0500
 To:  hwg-techniques(at)hwg.org
  todo: View Thread, Original


Hello HTML people.  

I am up against another mental block.  I'm trying to build an x-y
array of data input fields and then send them recursive to be used
further down the program.  

I can do this fine with a fixed number of columns and rows of user
input but I cannot figure out how to make this happen using a variable
number of columns.  I'm a complete array amateur and would appreciate
a little assistance...

I want it to look something like this:

Name          Temp      Time      Offset    Etc.      As needed...   
process 1    [input]   [input]   [input]   [input]   [inputs] 
process 2    [input]   [input]   [input]   [input]   [inputs] 
process 3    [input]   [input]   [input]   [input]   [inputs] 
process 4    [input]   [input]   [input]   [input]   [inputs]

Right now, for the three *basic* columns, I have the lines below in a
'while' loop.

<INPUT TYPE='text' NAME='temp[]' VALUE='$temp' SIZE='10'
MAXLENGTH='10'> 
<INPUT TYPE='text' NAME='time[]' VALUE='$time' SIZE='10'
MAXLENGTH='10'> 
<INPUT TYPE='text' NAME='offs[]' VALUE='$offs' SIZE='10'
MAXLENGTH='10'> 

But when it comes to adding the additional columns that a user
determines are needed, I am lost.  They might want to add 0, or 4, or
10 additional items...  I would like only the needed number of usable
input columns be on the form and identified for what they contain, and
then to pass them to the next page (using php, btw).

Many thanks in advance.

Floyd


--

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA