Hi guys,

I'm quite happy with myself because after so long i've been using CF  
i haven't always been using it in 'rapid development'... but today  
instead of keep re-writing code, usually in a copy & paste style then  
a re-hash of variable names etc I decided I was going to create an  
include file so I could reuse a form.  In this case it was a 'contact  
us form'.

I created an include file that had a form in it and also a <cfif  
isDefined> type thingy so that if the form had been submitted then it  
would action that.

So I have on my main page:

---------------------------------------------------------------------
                 <!--- contact us form --->
                 <cfset actionPage = "/index_02005ii.cfm?cp=13">
                 <cfinclude template="/webs/02005/includes/ 
include_formContactUs.cfm">
                 <!--- end of contact us form --->
---------------------------------------------------------------------

AND ON my include_formContactUs.cfm I have:

---------------------------------------------------------------------

<cfif isDefined('sendContact')>
Blah blah
</cfif>

My form

---------------------------------------------------------------------

However, I know this is probably the right time for me to do it  
another way, but i'm just not sure how to do it.  It works fine the  
way it is but i know that for instance i have set the actionPage but  
i'm sure there is a different way of doing that?  It's not a  
CFFUNCTION i have to make is it?

Is it worth doing it for this?  I'm sure it would come handy because  
so often I have written 'contact us' type action forms.

Thanks for your help,

Saturday


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:220488
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

Reply via email to