Bobby and Barney,

I liked this solution so well that I wrote a blog post on it. Good stuff:

http://www.coldfusionmuse.com/index.cfm/2008/6/14/form.case.insensitive#more

 -mk


-----Original Message-----
From: Bobby Hartsfield [mailto:[EMAIL PROTECTED] 
Sent: Saturday, June 14, 2008 12:48 PM
To: CF-Talk
Subject: RE: Case Sensitive Form Field Names

Barney to the rescue again! Thanks man, works like a champ. 

For the sake of the archives, here is a working example:

<cfif cgi.request_method is "post">
        
        <cfset paramNames =
getPageContext().getRequest().getHttpRequest().getParameterNames() />

        <cfscript>
                while(paramNames.hasMoreElements())
                {
                        thisField = paramNames.nextElement();
                        writeoutput(thisField & ' = ' & form[thisField] &
'<br />');
                }
        </cfscript>

</cfif>
<hr />
<form name="tempForm" action="#cgi.script_name#" method="post">
        FieldOne: <input type="text" name="fieldOne" value="1" /><br />
        FieldTwo: <input type="text" name="fieldTwo" value="2" /><br />
                          <input type="submit" name="SubmitForm"
value="SubmitIt" />
</form>


...:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
http://cf4em.com



-----Original Message-----
From: Barney Boisvert [mailto:[EMAIL PROTECTED]
Sent: Saturday, June 14, 2008 12:46 PM
To: CF-Talk
Subject: Re: Case Sensitive Form Field Names

You can use the HttpServletRequest object
(getPageContext().getRequest()) to pull an enumeration of case-sensitive
parameter names.



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307497
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to