Replace or append items in coldfusioin string

I have a form with some checkboxes. When the form is submitted, the items are saved as a string and separated by commas. So if the checkboxes for "bob", "larry" and "greg" were selected the form value is: bob,larry,greg

I need to take each of those values and add "" and separate them with semi colons (except the last one). So, they would be:;;

I'd also like to create a list with the values after they are set with the

Could someone assist?

Thank you.
Who is Participating?
_agx_Connect With a Mentor Commented:
Something like ...

<!--- change delimiter from "," to ";" --->
<cfset newList = arrayToList(listToArray(FORM.theFieldName), ";")>
<cfif listLen(newList, ";")>
     <!--- append "" to last element --->
     <cfset newList = newList &"">
earwig75Author Commented:
You're the best.
Thanks. Glad I could help :)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.