Title:
Multiple Form Elements With the same name turned into array - missing empty elements
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Michael Schmidt / Michael Schmidt (Michael.Schmidt.lmco)
Created: 05/15/2013
Components: General Server
Versions: 10.0
Failure Type: Non Functioning
Found In Build/Fixed In Build: Final / CF10_Update14
Priority/Frequency: Critical / All users will encounter
Locale/System: English / Win All
Vote Count: 16
Problem Description:
Prior to CF10 to turn a repeated form element into an array we used getPageContext().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.
Steps to Reproduce:
Create a form like so: <form method="post"><input type="fld" value='1'><input type="fld" value=""><input type="fld" value="3"><input type="submit"></form>
Actual Result:
This returns an array form["fld"] with a length of two containing [1,3]
Expected Result:
This should have returned an array form["fld"] = [1,"", 3]
Any Workarounds:
Switching the form to enctype="multipart/form-data" and using form.getPartsArray()
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3560964
External Customer Info:
External Company:
External Customer Name: Michael.Schmidt.lmco
External Customer Email:
External Test Config: My Hardware and Environment details:
Attachments:
- May 16, 2013 00:00:00: 1_debugFormPost.cfm
Comments: