Someone has asked me to draw attention to this issue (3560964), as they are dissatisfied with the way Adobe have handled it. Personally, I'm ambivalent, but err more towards the community members' positions than Adobe's. The detail of the ticket boils down to this:
Prior to CF10 to turn a repeated form element into an array we usedgetPageContext().getRequest().getParameterMap()
.
This worked smoothly this feature was replaced in CF10 with the application flag:
<cfset This.sameFormFieldsAsArray = true>
This works nice except it removes empty elements.getPageContext()...getParamterMap()
now returns an empty struct.
I made this comment against the ticket a while back:
getParameterMap()
function, but they left the form scope as-is: IE, it loses data about empty form fields. Here's the Adobe justification:Anyway, arrays in ColdFusion do not have this problem, so it's a bit bloody daft to continue to lose data if one doesn't need to.
The rationalisation that "That is because this will create inconsistency between array and comma separated representations of same form fields in FORM scope." is facile because the two can't coexist anyhow, so it's a non-issue.
What should be done here is that the list version should be fixed so that it doesn't omit data. Then the list and the array would match.
But I'd say this issue has not been dealt with satisfactorily. And it's another example of some very torturous logic when it comes to addressing issues (or justifying not addressing issues).
--
Adam
1) restore getPageContext().getRequest().getParameterMap();
2) if This.sameFormFieldsAsArray is true, make the form scope work as per expectation too.
--
Adam