Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 602497
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T16:49:45+00:00 2026-05-13T16:49:45+00:00

below is the code i’m using to test this: <cfif structkeyexists(form, submitted)> <cfdump var=#getPageContext().getRequest().getParameterMap()#>

  • 0

below is the code i’m using to test this:

<cfif structkeyexists(form, "submitted")>
    <cfdump var="#getPageContext().getRequest().getParameterMap()#">
</cfif>

<cfoutput>
<form method="post" action="#cgi.script_name#?firstname=tony">
    <input type="text" size="50" name="page[contents][][content]">
    <input type="text" size="50" name="page[contents][][content]">
    <input type="hidden" name="submitted" value="1">
    <input type="submit">
</form>
</cfoutput>

what we’re doing is using getPageContext().getRequest().getParameterMap() to retrieve a hash of the form and url scopes during a post request. now this work all fine and dandy until you set the enctype attribute of the form to “multipart/form-data‎” like so:

<cfif structkeyexists(form, "submitted")>
    <cfdump var="#getPageContext().getRequest().getParameterMap()#">
</cfif>

<cfoutput>
<form method="post" action="#cgi.script_name#?firstname=tony" enctype="multipart/form-data‎">
    <input type="text" size="50" name="page[contents][][content]">
    <input type="text" size="50" name="page[contents][][content]">
    <input type="hidden" name="submitted" value="1">
    <input type="submit">
</form>
</cfoutput>

what happens at this point is that none of the form field value are returned in the hash returned from getPageContext().getRequest().getParameterMap().

does anyone know where or how we can get this data or a workaround?

the whole reason we’re using getPageContext().getRequest().getParameterMap() is because it returns an array as the value of the variable instead of a comma delimited list like using the form scope does.

UPDATE: this is on 8.0.1 with cumlative hotfix 4 applied.

UPDATE: The reason you can’t use listToArray is because say you have two fields named firstname and the user enter in values for both fields (1 and 2). what CF will do is return a key in the form struct called firstname with a comma delimeted list for the two values (1,2). this is great, but say the user enters in values for the field that contain commas like 1,2,3,4 for the first field and 5,6,7,8 for the second field. the value in the form struct for firstname will be 1,2,3,4,5,6,7,8. this isn’t correct. now since getParameterMap() returns an array for the value, i would have two elements like so: [“1,2,3,4″,”5,6,7,8”].

UPDATE: Tried seeing what getHttpRequestData().content would return per Leigh’s suggest. It appears to be a blank binary.

UPDATE: Thanks you Leigh for figuring this out and without using getPageContext entirely. the trick was using getPartsArray() method on the form scope. I didn’t even know this existed!

Keep the ideas coming please!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T16:49:45+00:00Added an answer on May 13, 2026 at 4:49 pm

    (Okay.. take two) This seems to work with CF9. I am not able to test it with CF8 at the moment. Can you give it a whirl?

    <cfif structkeyexists(form, "submitted")>
       <!--- if this is a multipart request ...--->
       <cfset variables.parts = form.getPartsArray()>
       <cfif structKeyExists(variables, "parts")>
          <cfoutput>   
          <cfloop array="#variables.parts#" index="p">
             <cfif p.isParam()>
                isParam() = #p.isParam()# <br />
                getName() = #p.getName()# <br />
                stringValue() = #p.getStringValue()# <hr />
             </cfif>
          </cfloop>
          </cfoutput>
       </cfif>
    </cfif>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 304k
  • Answers 304k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Have you read this blog post from Phil Haack? Installing… May 13, 2026 at 8:51 pm
  • Editorial Team
    Editorial Team added an answer Using $class->getAttributes() outside of the foreach loop and using a… May 13, 2026 at 8:51 pm
  • Editorial Team
    Editorial Team added an answer I agree with @Simon. Paste some code so that we… May 13, 2026 at 8:51 pm

Related Questions

I have a JSP page retrieving data and when single or double quotes are
I am currently running into a problem where an element is coming back from
Below is the code I'm using to run the query, parse the result set,
The code below is the code i am using. It works fine in thunderbird
I want to deflate a file using deflate stream. Below is the code I

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.