Skip to main content
Participant
April 23, 2021
Question

Problem with CF2018 MultiSelect checkboxes and select passing an array rather than a list

  • April 23, 2021
  • 1 reply
  • 163 views

I ran into a problem when applying the 11th update for CF2018 as the drive ran out of space, which corrupted the files and ended up having to uninstall and re-install on a separate drive in order to resolve the issue; however, now I am dealing with an odd quirk in that when a form with multiple checkboxes or multiple selections from a select lists is submitted -- I receive the variable as an array rather than a list, which causes issues when I attempt to pass that variable into a query via cfqueryparam.

Is there an option that can be adjusted to control this behavior?   My code has not changed and now gives an error about a complex type.   I would prefer to have the items submitted as a list or string, as otherwise, I have to go into my code in all these places to test if it's an array and then call ArrayTolist, which was never needed before the reinstall.

    This topic has been closed for replies.

    1 reply

    Charlie Arehart
    Community Expert
    Community Expert
    April 23, 2021

    Yes, there is a solution. See my response to a similar question here:

     

    https://community.adobe.com/t5/coldfusion/coldfusion-2018-update-11-error/m-p/11954596#M188253

     

    There's a discussion there also how this is unexpected and undocumented in the update, and so unfortunate, but no longer unresolved for you, to slip in one more "un" there. 🙂 

     

     

    /Charlie (troubleshooter, carehart. org)
    BKBK
    Community Expert
    Community Expert
    April 24, 2021

    The gist of the discussion Charlie refers to: set sameFormFieldsAsArray to false.

     

    Application.cfm

    <cfapplication name="myApplication" sameFormFieldsAsArray="false">

     

    Application.cfc

    <cfcomponent >
      <cfset this.name = "myApplication">
      <cfset this.sameFormFieldsAsArray="false">
    </cfcomponent >