Last reviewed: 3/23/2024 12:23:14 PM
In this article
<initial>
An <initial> element declares initial logic upon entry into a (mixed initiative) form.
Syntax
<initial cond="expression"
expr="expression"
name="var" />
Attributes
cond
An expression that must evaluate to true after conversion to boolean in order for the form item to be visited.
expr
The initial value of the form item variable.
name
The name of a form item variable used to track whether this is eligible to execute. The default value is an inaccessible internal variable.
Children
<audio>, <catch>, <enumerate>, <error>, <help>, <link>, <noinput>, <nomatch>, <prompt>, <property>, and <value>.
Parents
Variables
none
Example
The following example illustrates initial logic.
<initial name="bypass_init">
<prompt>
Where do you want to drive from and to?
</prompt>
<nomatch count="1">
Please say something like "from Atlanta Georgia to Toledo Ohio".
</nomatch>
<nomatch count="2">
I'm sorry, I still don't understand.
I'll ask you for information one piece at a time.
<assign name="bypass_init" expr="true"/>
<reprompt/>
</nomatch>
</initial>
Version Information
Supported in: VoiceXML 1.0, VoiceXML 2.0, and VoiceXML 2.1.