coldfusion problem

TechBoyJK

Lifer
Oct 17, 2002
16,699
60
91
I have a coldfusion problem. I am writing an app, and in a certain section of the app, I have an CFIF statement. Regardless if the statement is true or false, cf server is skipping whatever is between the tags. However, not more than 100 lines or so above my problem statement, an identical cfif statement is in place, and giving no problems. Originally, before the problem if statement was in place, I simply had a single form action function, but I need to select from two different form statements, depending on if a session value is true or false.


Here is the original code (from that section)

<CFFORM ACTION="http://company.com/index.cfm?fuseaction=process" METHOD="post">

this does not throw an error
--------

updated code below is what is the problem

<CFIF isDefined("session.myid")>
<CFFORM ACTION="http://company.com/index.cfm?fuseaction=process" METHOD="post">
<CFELSE>
<CFFORM ACTION="http://company.com/index.cfm?fuseaction=process1" METHOD="post">
</cfif>



The error I get when I use the problem code is that CF find an extraneous </cfform> tag. If I don't use the CFIF statement for the cfform action code, and just use the straight formaction code, it will work. However, no matter what the condition of the CFIF statement, the code between the tags gets skipped..

What could be causing this?????

 
Dec 27, 2001
11,272
1
0
The code here looks fine. Possibly try the reverse. Start with <cfif not isdefined("etcetc") >.

Problem must be somewhere else.