developer_guide:voicexml_references:elements:elseif

no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


developer_guide:voicexml_references:elements:elseif [2015/10/27 11:14] (current) – created borja
Line 1: Line 1:
 +====== < elseif > ======
  
 +===== Description =====
 +The < elseif > element is used within the conditional logic statement <if> and optional <else> element.
 +
 +===== Syntax =====
 +<code>
 +<elseif
 +cond="ECMAScript_Expression"/>
 +</code>
 +
 +===== Attributes =====
 +|cond|The cond attribute is the Boolean expression for the conditional logic statement. This attribute is required.|
 +
 +===== Parents =====
 +<code>
 +<if>
 +</code>
 +
 +===== Children =====
 +<code>
 +None.
 +</code>
 +
 +===== Extensions =====
 +<code>
 +None.
 +</code>
 +
 +===== Limitations/Restrictions =====
 +<code>
 +None.
 +</code>
 +
 +===== Example Code =====
 +<code>
 +<?xml version="1.0"?>
 +<vxml version="2.0" xmlns="http://www.w3.org/2001/vxml">
 + <var name="card_type" expr="'amex'" />
 + <form>
 +  <field name="card_num" type="digits">
 +   <prompt>What is your card number?</prompt>
 +   <filled>
 +    <if cond="card_type == 'amex' &amp;&amp; card_num.length != 15">
 +     American Express card numbers must have 15 digits.
 +     <clear namelist="card_num"/>
 +    <elseif cond="card_type != 'amex' &amp;&amp; card_num.length != 16"/>
 +     Mastercard and Visa card numbers have 16 digits.
 +     <clear namelist="card_num"/>
 +    </if>
 +   </filled>
 +  </field>
 + </form>
 +</vxml>
 +</code>
  • developer_guide/voicexml_references/elements/elseif.txt
  • Last modified: 2015/10/27 11:14
  • by borja