Phil-
You're thinking about the problem incorrectly. Since all of the parameters that
you want to dynamically evaluate are optional, evalute them before calling the
tag. As follows (UNTESTED):
<cfset variables.sMustChangePassword = "no">
<cfset variables.sCannotChangePassword = "no">
<cfset variables.sPasswordNeverExpires = "no">
<cfset variables.sAccountDisabled = "no">
<cfswitch expression="#form.select#">
<cfcase value="mcp"><cfset variables.sMustChangePassword = "yes"></cfcase>
<cfcase value="ccp"><cfset variables.sCannotChangePassword = "yes"></cfcase>
<cfcase value="pne"><cfset variables.sPasswordNeverExpires = "yes"></cfcase>
<cfcase value="ad"><cfset variables.sAccountDisabled = "yes"></cfcase>
</cfswitch>
<cfoutput>
<CFX_Users
ACTION="ADD"
USER="#form.adduser#"
FULLNAME="#form.addfullname#"
PasswordNeverExpires="no"
Password="form.addpassword#"
MustChangePassword="#variables.sMustChangePassword#"
CannotChangePassword="#variables.sCannotChangePassword#"
PasswordNeverExpires="#variables.sPasswordNeverExpires#"
AccountDisabled="#variables.AccountDisabled#">
</cfoutput>
=-)
--IronFury
On Tue, 16 April 2002, phumes1 wrote
>
>
> Hi,
>
> I have a custom tag that I want to add some <CFIF statements but I'm not
> sure if this can be done.
> Has anyone had experience doing this before?
>
> I'm passing the username, fullname and password from input boxes and the
> password items with checkboxes
> to my template.
>
> The below custom tags is from the IHTK toolkit at
> http://www.intrafoundation.com/ihtk.html
>
> <cfoutput>
>
> <CFX_Users
> ACTION="ADD"
> USER="#FORM.adduser#"
> FULLNAME="#FORM.addfullname#"
> PasswordNeverExpires="no"
> <cfif FORM.select IS "mcp"
> MustChangePassword="yes"
> <cfelse>
> <cfif FORM.select IS "ccp"
> CannotChangePassword="yes"
> <cfelse>
> <cfif FORM.select IS "pne"
> PasswordNeverExpires="yes"
> <cfelse>
> <cfif FORM.select IS "ad"
> AccountDisabled="yes"
> </cfif>
> </cfif>
> </cfif>
> Password="#FORM.addpassword#">
> </cfif>
> </cfoutput>
>
>
>
>
+-----------------------------------------------------------------------------------+
>
> Philip Humeniuk
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
>
+------------------------------------------------------------------------------------+
>
>
>
-------------------------------------------------------------------------
This email server is running an evaluation copy of the MailShield anti-
spam software. Please contact your email administrator if you have any
questions about this message. MailShield product info: www.mailshield.com
-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org