Hi, Dominic and thanks for the reply...

The second option sounds more like what I'm wanting to do.

And while reading your response, it occurred to me that if I
send the form data to a cfc for validation, and it validates,
I could just go straight to another method (how about to another cfc?) 
for the email processing
without going back to the orginal form page and then to the
email processing cfc.  (make sense?)

So, I would go from form page to validation method, and if all validates,
straight to the email method to send emails.

And from your description below, I would just refer to the 
arguments.variables
in the second method as in the first?  No, I guess I couldn't use the 
"arguments" scope
and share variables between methods...I'd need to put the data into the 
"variables" scope
to share between methods.  Right?

And, if that's so, I guess each form variable has to be established in 
the first validation
method by translating each piece of data in to the variable scope with
<cfset variables.name = arguments.name> in order to share those 
variables within a CFC.

Am I correct?

Thanks for the feedback.

Rick

Dominic Watson wrote:
> Something like this?
>
> <cfif someObject.validateTheForm(argumentCollection = form) >
>      <cfset variables.foo =
> anotherObject.doSomethingWithForm(argumentCollection = form) />
> <cfelse>
>      Form did not validate
> </cfif>
>
> Or, are you wanting to pass the form data to another cfc method from
> within the validation method? If so, something like this:
>
> <cffunction name="validateTheForm" ...>
>    <cfargument name="foo" ... />
>    <cfargument name="bar" ... />
>
>    <cfscript>
>         ...
>         someOtherObject.doSomethingWithFormData( argumentCollection =
> arguments ) ;
>         ...
>    </cfscript>
> </cffunction>
>
> Dominic
>
> 2008/11/1 Rick Faircloth <[EMAIL PROTECTED]>:
>   
>> Hi, all...
>>
>> Can form variables be passed around between a calling page and
>> multiple cfc's?
>>
>> I have a form with data I want to validate, then generate an email with.
>>
>> I have the calling page with the form, which sends the form data via
>> argumentCollection,
>> to a form_validation.cfc.  If the form data passes validation, then I
>> want to send the form
>> data to an email_processing.cfc for email generation.
>>
>> Would the form variables be available to the calling page and both cfc's
>> in this case?
>> Or do I need to create session variables or another type of variable to
>> pass the values
>> around?
>>
>> Thanks,
>>
>> Rick
>>
>>
>>     
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:314718
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to