Working with Form Arrays in ColdFusion?

后端 未结 7 2134
旧时难觅i
旧时难觅i 2021-01-17 23:17

I have no idea how to handle this in ColdFusion 9, I have a form being submitted (POST) with element checkboxes, called items[].

When I do a

7条回答
  •  遇见更好的自我
    2021-01-17 23:26

    I suggest that you remove the "[]" from the name since it disallows dot notation as mentioned in another answer.. When more than one form element contains the same name attribute, the browser will concatenate all of the values into a comma delimited string when submitting the form. Fortunately, ColdFusion has many functions which treat a delimited string as a list. You can use along with these functions to consume the list.

提交回复
热议问题