Use this tag within cfif tags and optionally, together with other cfelseif tags and a final cfelse. The cfelseif lets you create compound conditional statements in CFML. The cfelseif tag will handle cases not handled by the original cfif or preceding cfelseif tags. The value in the cfelseif tag can be any expression.

This tag cannot have a body.

This tag is also supported within <cfscript>

Attribute Description
boolean, optional

Expression condition

<cfelseif #boolean condition#>


Tag format

lucee+trycf <cfif isArray(SERVER)> <cfset result="It is in Array format"> <cfelseif(isStruct(SERVER))> <cfset result="It is in Structure format"> <cfelse> <cfset result ="Other than struct & Array" > </cfif> <cfdump var="#result#" />

Script format

luceescript+trycf <cfscript> //script format numb=1 if(numb gt 1){ writeOutput("It is greater than 1 "); }else if(numb eq 1){ writeOutput("It is equal to 1 "); }else{ writeOutput("It is not greater than or equal to 1 "); } </cfscript>

See also