Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hidden fields that don't seem to work

Status
Not open for further replies.

MinalMoe

IS-IT--Management
Mar 25, 2004
62
GB
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.
 
You need <cfoutput> to output a variable, and if you're referencing a variable from a previous form, you need to scope it:
Code:
[red]<cfoutput>[/red]
 <input type="hidden" name="Res_Type" value="#[red]Form.[/red]Res_Type#" />
 <input type="hidden" name="Dep_Type" value="#[red]Form.[/red]Dep_Type#" />
 <input type="hidden" name="Des_Type" value="#[red]Form.[/red]Des_Type#" /> 
[red]</cfoutput>[/red]

Hope This Helps!

ECAR
ECAR Technologies

"My work is a game, a very serious game." - M.C. Escher
 
Or simply turn them into cfinput's

Code:
<cfinput type="hidden" name="Res_Type" value="#Form.Res_Type#" />
 <cfinput type="hidden" name="Dep_Type" value="#Form.Dep_Type#" />
 <cfinput type="hidden" name="Des_Type" value="#Form.Des_Type#" />

Hope this helps!

Tony
 
Oh, well, yeah...if you want to do it the easy way....[thumbsup2]


Hope This Helps!

ECAR
ECAR Technologies

"My work is a game, a very serious game." - M.C. Escher
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top