> I have a conditional form post:
>
> <cfif blah>
>     <cfform .... >
> <cfelse>
>     <cfform ...>
> </cfif>
> .
> .
> </cfform>
>
> But ColdFusion gives a JIT error that there is an extraneous
> </cfform> tag.
>
> What other ways are there of doing this?

The CF parser pairs up tags before the CFIF logic is executed, and thinks
that you might not have an opening CFFORM tag. You can remedy this by
placing either the start and end tags within the same CFIF block:

<CFIF blah>
        <CFFORM ...>
        ...
        </CFFORM>
<CFELSE>
        <CFFORM ...>
        ...
        </CFFORM>
</CFIF>

or by moving them out of the CFIF entirely:

<CFIF blah>
        <CFSET myvar = "blah">
<CFELSE>
        <CFSET myvar = "notsoblah">
</CFIF>

<CFFORM ACTION="#myvar#.cfm">
...
</CFFORM>

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to