> -----Original Message-----
> From: Richard Crawford [mailto:[EMAIL PROTECTED]
> Sent: Monday, May 23, 2005 9:15 PM
> To: CF-Talk
> Subject: There's got to be a way around this
>
> In PHP you can cope with this quite nicely by directly accessing the
> HTTP_POST[] array, casting it to an object and looping through the
> properties, but I can't find a similar way to do that in Cold Fusion. In
> Cold Fusion, it looks like I have to use <CFPARAM var=value> for every
> single
> possible variable that might come from the form page. Is there a way
> around
> that?
I'm not sure what you're asking and want to be.
Ben and Isaac (a biblical sounding pair if ever I've heard one) have already
shown you several methods for accessing arbitrary form fields. My confusion
is your mention of <CFPARAM>.
CFPARAM has nothing specifically to do with Forms - it's there to provide
default values for known variables that may, for some reason, not be
received. Its most often used for the FORM and URL scopes but can be used
for any scope at all.
CFPARAM creates variables that you need if they're not present (it can also
test type) - it doesn't really seem appropriate at all in a situation where
you don't know what's coming down the pipe. In effect CFPARAM is shorthand
for this:
<cfif NOT IsDefined("Form.MyField")>
<cfset Form.Myfield = "MyDefaultValue" />
</cfif>
It seems to me like you might be under the impression that CFPARAM HAS to be
used to access form variables and this just isn't the case. Any form fields
passed to the page are present regardless of whether you use CFPARAM or not.
Make sense? Am I missing the point?
Jim Davis
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a project or with a
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:207503
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54