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 
> (not quite up to speed on that yet) and I'm looking for just 
> traditional html/cf.
>  
> Thanks a bunch!
>
> Rachel Maxim
>  
>
>



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"farcry-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/farcry-dev
-~----------~----~----~----~------~----~------~--~---

Attachment: edit.cfm
Description: application/cfm

Attachment: pqTripType.cfc
Description: application/cfc

Attachment: e11CustomType.cfc
Description: application/cfc

Reply via email to