You are awesome - thank you so much!
Rachel
On 3/27/06, Scott Talsma <[EMAIL PROTECTED]> wrote:
Rachel,
Attached are files that implement a simple custom type. It is older
code, and not I have doing things anymore, but you will get the sense of
how it operates. If I were to make changes, I would eliminate the
e11CustomType, and have pqTripType inherit directly from types.cfc, and
simply <cfimport> the display functionality in e11CustomType as needed.
Also note that this was written for FC2.3.
Here is the gist.
<cffunction name="edit">
<cfargument name="objectID">
<cfif NOT StructIsEmpty(form)>
<!--- calls inherited save/update functionality --->
<cfset saveSuccess = setData( form )/>
<cflocation ....>
<cfelse>
<!--- calls inherited get/select functionality --->
<cfset stObj = getData(objectID)
<cfform>
<cfinput name="label" value="#stObj.label#"/>
<cfinput name="customTextField1"
value="#stObj.customTextField1#"/>
<cfinput name="customTextField2"
value="#stObj.customTextField2#"/>
<cfinput name="customTextField3"
value="#stObj.customTextField3#"/>
<cfinput type="submit" name="save" value="Save"/>
</cfform>
</cfif>
</cffunction>
Have a look at some of the simple built-in (fact, link, etc) types for
more details. Avoid PLPs until you get the hang of simpler types. We
are using Flash Forms w/tab-groups, so that allowed us to avoid the PLP
issue entirely.
Rachel Maxim wrote:
> Does anyone have a sample edit handler for a Custom Type you've
> developed that you'd be willing to share as an example? I'm trying to
> use the example/tutorial off of Brendan Sisson's old website, but the
> code for the edit handler is not in the PDF I have and the site is no
> longer online. Still trying to grasp just what goes on in the edit.cfm
> page and what I need to write manually vs what Farcry already does. I
> checked out the built-in type files but they all use the PLP syntax
h 301.770.8932
c 240.355.8041
w 240.235.9748
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "farcry-dev" group.
To post to this group, send email to farcry-dev@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/farcry-dev
-~----------~----~----~----~------~----~------~--~---
- [farcry-dev] Re: Sample edit handler for custom types Rachel Maxim