Title:
Bug 82771:When CF handles a form post that contains N form fields of the same name, it combines them into a list
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Raymond Camden / Raymond Camden (Raymond Camden)
Created: 04/28/2010
Versions: 10.0
Failure Type: Unspecified
Found In Build/Fixed In Build: 0000 / 280762
Priority/Frequency: Normal / Unknown
Locale/System: English / Platforms All
Vote Count: 12
Problem:
When CF handles a form post that contains N form fields of the same name, it combines them into a list. So for example, if you had two form fields with the name, "name", the value of form.name is a list that combines the two values. However, imagine a user enters "Camden, Raymond" and "Smith, John" in those two fields. Now we have form.name="Camden,Raymond,Smith,John". There is no way to tell which value was in the first field and which was in the second.What we need is a way to tell CF to NOT use a list but an array instead. Perhaps a simple CFSETTING: <cfsetting treatmultipleformfieldsasarray="true">. This would then give me a non simple form.name value (an array). That's an ugly tag right there, but you get the idea. This would be backwards compatible.Now you may argue - why not just use different form names? Sometimes we don't have control over the form post. It may be a remote post for example. We can use Java to get around it, but if CF is already doing the work ("Hey, I see another form.name, I'll just listAppend it!") then it seems like it should be trivial for it to use an array if asked to ("Wow, another form.name? Well Ray said he wanted an array so I'll use that instead.")
Method:
Create a form with 2 (or more) fields of the same name. Use commas in your value. Now try to figure out which is which.
Result:
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3041386
Deployment Phase: Release Candidate
External Customer Info:
External Company:
External Customer Name: Raymond Camden
External Customer Email: 5FBC41E943BD265C992015D5
External Test Config: 04/28/2010
Attachments:
Comments: