• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

New Here ,
Apr 23, 2021 Apr 23, 2021

Copy link to clipboard

Copied

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.

Views

90

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 23, 2021 Apr 23, 2021

Copy link to clipboard

Copied

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)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 24, 2021 Apr 24, 2021

Copy link to clipboard

Copied

LATEST

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 >

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation