> It seems that on every Cold Fusion page that processes
> variables from a
> previous page -- say a form and the page that processes
> the form -- every
> variable on the form must be accounted for.  This is fine
> if the form is
> unchanging, but if the form is dynamic and might change
> every time it's
> loaded, the number and name of the variables that it
> passes to the processing
> page may change.

> 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?

Several...

<cfloop index="field" list="#strutkeylist(form)#">...</cfloop>

<cfif structkeyexists(form,"fieldname")>...</cfif>

<cfloop index="field" list="fielda,fieldb,fieldc">
<cfparam name="form.#field#" type="string" default=""></cfloop>

<cfset structappend(form,url,false)>
(puts all url variables in the form scope without overwriting)


s. isaac dealey     954.522.6080
new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework

http://www.fusiontap.com
http://coldfusion.sys-con.com/author/4806Dealey.htm


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:207500
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to