Comma question with loops/form
Hi all-
I have a problem with commas. I use a loop to create a set of <cfinputs> all with the name "theData". Thus when you enter some data in the input boxes and hit submit, the dump shows the contents of "theData" as the contents of each <cfinput> separated by a comma.
The real form can have a couple hundred of these inputs, which is why I used the one name (I pass the whole thing off to the database to dissect it).
Great, except that I don't know what to do if the user enters data with a comma in one of the <cfinputs>...in the dump now the fields are co-mingled with the data, and I can't tell what is 'data' and what is a field. That has to have come up enough that there's probably a built-in solution that I'm not grokking...is there a way to properly separate the individual fields so that I can tell what is truly data, regardless of what the user puts in the field?
<cfif isDefined("Form.saveStuff")>
<cfdump var="#Form#" label="Form Variables">
</cfif>
<html>
<body>
<cfform>
<cfloop index = "LoopCount" from = "1" to = "5">
<cfinput size="4" style="background-Color:##66FF00" type="text" name="theData"/>
<br/>
</cfloop>
<cfinput name="saveStuff" type="submit" value="Save It" />
</cfform>
</body>
</html>
Thanks,
Ron
