How can I make a list of form fields test1 = "firstname,lastname,mode, etc" My goal is to move the code to a object so I can just pass it in.
<cfinvoke component="#request.componentdir#.tars.tars" method="init" returnvariable="oTars"> <cfscript> test1 = 'mode'; if(isDefined("session.formFields.#test1#") and session.formFields.#test1# neq ''){ oTars.set#test1#(session.formFields.#test1#); } test2 = 'mode'; if(isDefined("session.formFields.#test2#") and evaluate("session.formFields.#test2#") neq ''){ evaluate(oTars.set#test1#(session.formFields.#test2#)); } </cfscript> <cfdump var="#oTars#">
0
votes
The question is not entirely clear, but if you are using cfinvoke to run the init method of a cfc, you might be on the wrong path altogether.
- Dan Bracuk
Which version of ColdFusion?
- Adam Cameron