> From: Robert Redpath [mailto:[EMAIL PROTECTED] > What is the proper way to refer to form objects? > > #form.email# or #email# > > Are they interchangeable? Can I call use <cfparam > name="form.email" default="">, but still refer to it as #email#?
The proper way is to always scope your variables, so form.email should be what you use as well as in your cfparam. Scoping makes for better code... not to mention the fact that if you don't scope your variables CF has to traverse the scopes to find the one you are using, which could be the wrong one if you have the same variable in two different scopes! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:211150 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

