Using cfform structures in MX7 to pass details from 1 page to the next amending
and adding details from page to page.
So that on the second page the code is:-
<cfform name="Flight_Refine" id="Flight_Refine" method="post"
action="test_XML_Response_4.cfm">
<input type="hidden" name="Res_Type" value="#Res_Type#" />
<input type="hidden" name="Dep_Type" value="#Dep_Type#" />
<input type="hidden" name="Des_Type" value="#Des_Type#" />
<input type="hidden" name="Len_Type" value="#Len_Type#" />
<input type="hidden" name="Ad_Num" value="#Ad_Num#" />
Then passing the variables to test_XML_Response_4.cfm" in a repeat mechanism
where the code is:-
<cfform name="Data_Transfer" id="Data_Transfer" method="post"
action="test_XML_Response_5.cfm?Ch_Passed_No=#Ch_Pass_No#&In_Passed_No=#In_Pass_
No#&RDL=#RDL#">
<input type="hidden" name="Res_Type" value="#Res_Type#" />
<input type="hidden" name="Dep_Type" value="#Dep_Type#" />
<input type="hidden" name="Des_Type" value="#Des_Type#" />
Although the variables are all there, when they are passed to
test_XML_Response_5.cfm in the same way that they were passed to
test_XML_Response_4.cfm, if I attempt to view the variables in
test_XML_Response_5.cfm all I see is #variable# rather than the contents of the
variable, which can only be passed as *.cfm?variable=#variable#& etc.
Any ideas as to why this is happening.
Thanks.
cf_dev2 - 29 Jun 2007 19:37 GMT
Use <cfoutput> to save the variable values rather than the literal string
"#variable#". Its also good to scope your variables, like:
#form.res_type# instead of #res_type#
<cfoutput>
<cfform name="Data_Transfer" id="Data_Transfer" method="post"
action="test_XML_Response_5.cfm?Ch_Passed_No=#Ch_Pass_No#&In_Passed_No=#In_Pass_
No#&RDL=#RDL#">
<input type="hidden" name="Res_Type" value="#Res_Type#" />
<input type="hidden" name="Dep_Type" value="#Dep_Type#" />
<input type="hidden" name="Des_Type" value="#Des_Type#" />
....
</cfoutput>