Question

We're just looking at porting a legacy script to ColdFusion 10 and I believe I have come across a bug/change in functionality relating to the use of multiple form fields using the same name. In ColdFusion 9 these would have been appended to the relevant variable with commas, but in ColdFusion 10, if the case of the variables is different one field will overwrite the other.

The following test code:

<form action="index2.cfm" method="post">
    <input type="hidden" name="test" value="1" />
    <input type="hidden" name="TEST" value="0" />
    <input type="submit" />
</form>

<cfdump var="#form#">

Produces on ColdFusion 9

TEST = 1,0

On ColdFusion 10:

TEST = 0

Has anyone else experienced this behaviour and knows whether it is a bug or intended functionality? I know the application shouldn't be using the same variable name in different cases, so will look at changing this, but just wondered if anyone had any more information on the issue.

Edit

I have submitted this bug to Adobe at https://bugbase.adobe.com/index.cfm?event=bug&id=3298179

Was it helpful?

Solution 2

This bug appears to have been confirmed by Adobe in as Bug #3298179. It is reported as fixed in build 283412 and currently in the testing phase. I will update this answer with the relevent hotfix information once this has been released publicly.

OTHER TIPS

@Russ

This feature is indeed just that a feature. I believe you've missed the point in the above post that specifying the same field name with different case no longer passes a list result.

One of the main things I and many have used this functionality for in the past is checkboxes. A group can have the same name so that your validation is easy yet different values so CF can process which ones have been ticked before form submission(obviously unticked items aren't passed into the list).

That "feature" has been around since at least CFMX 6.1. I blogged about it back in '08: http://cfruss.blogspot.com/2008/01/passing-multiple-same-named-arguments.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top