Why can't I alter this variable... or find it in any scope?
<cfif action is "preview" >
CLEC Name:
<input type="text" name="form_clec_name" value="#clec_name#" size="35"><br />
<cfelse>
<cfset clec_name = "#form.form_clec_name#">
#clec_name# || #form.form_clec_name# || #variables.clec_name#
</cfif>
I'm very new to Coldfusion (usually work in PHP), and it has mostly made sense so far, but this is driving me nuts. All I'm trying to do is set the clec_name variable equal to an incoming form value, but it will not seem to listen to me. In the else condition in the block above, the output is always 'Original value || changed value || changed value'. So, if I specify the variables scope before clec_name I get the right value, which leads me to believe the one I really want is in a different scope - but I have no idea how to find it or set it. I used a short function I found online to dump all variables from every scope.... and it's not in there, even though it's clearly set and has a value.
I'm hoping whatever this is will be obvious to the Coldfusion pros - I'm hoping not to have to hunt down where the variable is created in the first place, since this is a HUGE and poorly written application. Any help is most appreciated ![]()
