Currently, there are checkboxes within a form, and the value of the selected checkboxes are stored in a DB when the form is submitted.
<td><input type="Checkbox" name="valueList" value="Some value, with comma" >Some value, with comma</td>
<td><input type="Checkbox" name="valueList" value="Another Value, with comma" >Another value, with comma</td>
<td><input type="Checkbox" name="valueList" value="Yet another value" >Yet another value</td>
However, the issue is with the commas as the current logic uses a list to store these values. So Some value, with comma
is inserted as Some value
and with comma
. The current list is created with the following:
<cfif isDefined("valueList")>
<cfset a=listlen(valueList)>
And the code continues by looping through the list. This is the only reference to valueList
I could find in the code. Is there a way to convert this to an Array without the commas becoming an issue?