Salesforce B2C Commerce 23.6 > Developing Your Site > Development Components > Templates > ISML

iselse Element

Use with <isif> to specify what happens if neither the <isif> condition nor any <iselseif> conditions evaluate to true.

Syntax

<isif condition = if_expression>
  ...
 <iselseif condition = elseif_expression> //0 or more
  ...
 </iselseif> 
 <iselse>
  ...
</isif>

Example

<input type="text" name="${pdict.CurrentForms.cart.couponCode.htmlName}" size="30"/>
<isif condition="${pdict.CurrentForms.cart.couponCodeValid.valid}">
value="${pdict.CurrentForms.cart.couponCode.htmlValue}"
	<iselse>
		value=""
</isif>

In this example, a coupon code is entered in the browser. If it's invalid, <iselse> returns a value of "".

X Privacy Update: We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used. By continuing to use this site you are giving us your consent to do this. Privacy Policy.