Lucee form scope not recognized -


the problem below puzzle, have not solved, found way deal with. tore apart xref2.cfm , put 1 line @ time. did that, form scope began work. nothing changed in code. remains mystery.

i have set of 4 procedures linked this:

person1.cfm: originates call program , url argument basetab=person . i'm focusing here on variable "fn".

    <cfif isdefined('url.basetab')>      <cfset basetab = url.basetab>     <cfset perloc  = url.perloc>     <cfset fn      = ''>     <cfset ln      = ''>     <cfset eof     = "no"> 

however person1.cfm may accessed cfinclude further down line, in case rely on form scope pass fn person1.cfm

   <cfelseif isdefined('form.fn')>    <cfset fn      = form.fn>    <cfset ln      = form.ln>    <cfset basetab = form.basetab>    <cfset perloc  = form.perloc>    <cfset eof     = form.eof>   </cfif> 

however, if neither url scope nor form scope defined here, variable fn should have been set in program including person1.cfm, should defined @ point.

    ... stuff ... <form action = "person2.cfm" method = "post" ... other stuff>  <input type = "text" name = "fn" value = "#fn#">   .... more stuff....   ... submit ... </form>       

person2.cfm: next step in process

   ... stuff ...  <cfset fn = form.fn>  <cfinclude template = "person1.cfm">   <form action = "xref1.cfm" method = "post" ... stuff >    <cfoutput>    <input type = "hidden" name = "fn" value = "#fn#">     </cfoutput>      .... stuff ....      .....submit ....  </form>          

xref1.cfm next step

   ... stuff ...  <cfset fn = form.fn>  <cfinclude template = "person2.cfm">   <form action = "xref2.cfm" method = "post" ... stuff >    <cfoutput>    <input type = "hidden" name = "fn" value = "#fn#">     </cfoutput>      .... stuff ....      .....submit ....  </form> 

xref2.cfm final step, done accumulated entries

      .... stuff ...  <cfset fn = form.fn>  <cfinclude template = "xref1.cfm">      ... no form ... other stuff ... 

the problem in xref2.cfm variable fn not being picked in form scope. checking things out, find form.fn not defined @ in xref2.cfm. when things cascade person1, fn not defined , throws error in input tag.

form.fn defined in person2.cfm , in xref1.cfm. when xref2.cfm, disappears. not understand why. can explain me why form scope not there in xref2.cfm?

i think typo or something.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -