> I have a fusebox application I am working on and need some 
> advice. I have a custom tag around each index.cfm file in 
> each circuit of the application.
> 
> In one circuit I have a page that displays a form. The user 
> fills out the form and submits it. Well I then have a fuse 
> called act_checkForm.cfm which calls a custom tag that checks 
> each form element for CFML, HTML, etc... well, what I need to 
> do is copy that structure (form) so that it will be available 
> to the calling template.
> 
> I have never used StructCopy before, is this the route I 
> should take? Does someone have an alternate suggestion?

First, as several people have noted, the Form scope is available within your
custom tag, so you don't really have to pass anything to it. However, if you
did have a custom tag that didn't automatically look in the Form scope, and
you wanted to pass the Form scope as a structure to it, you don't need to
copy it - you can pass it by reference:

<cf_mycustomtag mystruct="#Form#">

This will simply create a new name for the existing Form structure; you can
reference it with that new name within the custom tag. By default,
structures are passed by reference, not by value, and unless you need a
completely separate copy there's no need for you to force them to be passed
by value with StructCopy or Duplicate.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to