form.fieldNames will give you a list of the form elements and then
all you need to do is loop through the list and copy it over to
the caller scope. The below code should accomplish this. There may
be an easier way and if so, someone chime in.


IE

<cfloop list="#form.fieldNames#" index="i">
  <cfset #form_element# = "FORM." & #i#>
  <cfset formfields = #evaluate(form_element)#>
  <!---If our formfields value is "" set it's value to NULL//--->
   <cfif formfields is "">
    <cfset "CALLER.#i#" = "NULL">
   <cfelse>
    <cfset "CALLER.#i#"  =  #evaluate(FORM_ELEMENT)#>
   </cfif>
</cfloop>




"Success is a journey, not a destination!!"



Doug Brown
----- Original Message -----
From: "Michael Tangorre" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, April 26, 2002 3:30 PM
Subject: Copying a structure


> Hello.
>
> 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?
>
> Thanks,
> Mike
>
>
>
__________________________________________________________________
____
> Signup for the Fusion Authority news alert and keep up with the
latest news in ColdFusion and related topics.
http://www.fusionauthority.com/signup.cfm
> FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
> Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
> Unsubscribe:
http://www.houseoffusion.com/index.cfm?sidebar=lists
>

______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to