Howdy,
CF won't let you seperate cfform and /cfform so both opening and closing
tags need to be in the same branch of the cfif logic. For example,
cfif CONDITION
cfform action=true_action method=
/cfform
cfelse
cfform action=false_action method=
/cfform
/cfif
Or you can do something like this,
cfform method=
cfif CONDITION
action=true_action
cfelse
action=false_action
/cfif
/cfform
But you cannot do this,
cfif CONDITION
cfform
cfelse
cfform
/cfif
/cfform
HTH
Sean.
-----Original Message-----
From: Willy Ray [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 13, 2000 11:40 AM
To: [EMAIL PROTECTED]
Subject: CFIF and CFELSE
This is a MIME message. If you are reading this text, you may want to
consider changing to a mail reader or gateway that understands how to
properly handle MIME multipart messages.
--=_2C7475F2.A6C7A9E6
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable
There Must be something I don't know about CFIF. I want to check if a URL =
variable exists. If it does, I want to add the same variable to the URL =
of the action of a CFForm, basically so I can check for it on the action =
page, and use it to re-route a cflocation. =20
Here's the problem. I have a CFIF that, if it's true, starts a CFFORM =
with the URL variable included in the action, then it has a CFELSE that =
starts the same form, just without the URL variable. Problem is, it =
doesn't work. Tells me that there's an extraneous </CFFORM> at the bottom =
of the template. Basically, whether or not the criterion is met, it =
doesn't start the form. =20
I musta missed something about CFIF, CFELSE, or CFFORM. Any Ideas? =
Here's my logic:
<cfif IsDefined ('URL.myvariable')>
<cfform action=3D"emp_add_action.cfm?myvariable=3Dtrue" method=3D"post" =
enablecab=3D"Yes">
<cfelse>
<cfform action=3D"emp_add_action.cfm" method=3D"POST" enablecab=3D"Yes">=
</cfif>
Whether myvariable exists or not it doesn't print either of the cfform =
lines.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
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.