Ok I am working on an online form where counties in my state can enter in data based on the number of precincts they have. I have it currently when the county logs on that CF populates a table and creates text input fields so the user can type in the data. The problem is, each county has a different number of precincts so how to i insert fields into a database if I do not know how many text fields their will be. The number varies greatly (some have 4 others have 198).
For example (what the county will see)
Precinct 1 - [text input field 1]
Precinct 2 - [text input field 2]
[...]
Precinct x - [text input field x]
Like I said I already have the precincts stored in a database and when the form is generated by CF it puts the precinct names into the form for the county. But how do I save the user input?
I was thinking of putting the text input into an array using javascript, but I do not know how to loop through all the text fields easily.
Currently here is my code:
CODE
<table>
<cfinput type="text" name="modemNums" value="#popModem.recordCount#">
<cfoutput query="popModem">
<tr>
<td><cfinput type="text" name="precinct#popModem.currentRow#" value="#precinct#" readonly="true"></td><td><cfinput type="text" name="phone#popModem.currentRow#"></td>
</tr>
</cfoutput>
</table>
Ideas?!?