http://docs.farcrycms.org/display/FCDEV50/ftWatch+Example
quick editing job, feel free to correct / expand / etc. Tomek On Thu, Jun 4, 2009 at 7:31 PM, Tomek Kott <[email protected]> wrote: > Hi All, > > I wanted to play around with ftWatch and see what I could do with the > displays and such, and extending the two formtools (numeric, string) was > quite instructive. I thought it would be useful to post it here (and > eventually on wiki), since its an easy example of checking whether a boolean > field is being watched, and if so, displaying the input or not depending on > the boolean value: > > <cfif structkeyexists(arguments.stMetadata,"ftWatch") and > len(arguments.stMetadata.ftWatch) > AND > structkeyexists(arguments.stObject,"#listfirst(arguments.stMetadata.ftWatch)#") > > AND > isValid("boolean",arguments.stObject[listfirst(arguments.stMetadata.ftWatch)]) > > AND NOT > arguments.stObject[listfirst(arguments.stMetadata.ftWatch)] > > <cfset html=""/> > <cfelse> > <cfset html = super.edit(argumentCollection="#arguments#") /> > </cfif> > > And similar for display function. > > Now if only I could get rid of the label for that as well...any ideas on > that? > > Tomek > > > --~--~---------~--~----~------------~-------~--~----~ You received this message cos you are subscribed to "farcry-dev" Google group. To post, email: [email protected] To unsubscribe, email: [email protected] For more options: http://groups.google.com/group/farcry-dev -------------------------------- Follow us on Twitter: http://twitter.com/farcry -~----------~----~----~----~------~----~------~--~---
