|
Newsletters
|
|
|
|
|
Voice XML Reference
Voice XML Reference
Bookmark this page
The initial Element - <initial>
Description: In a typical mixed initiative form, the <initial> element is visited when the user is initially
being prompted for form-wide information, and has not yet entered into the directed mode
where each field is solicited individually. Like field items, it has prompts, catches, and event
counters. Unlike field items, <initial> has no grammars, and no <filled> action.
Example:
<form id="get_from_and_to_cities">
<grammar src="http://www.directions.example/grammars/from_to.gram"/>
<block>
Welcome to the Driving Directions By Phone.
</block>
<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>
<field name="from_city">
<grammar src="http://www.directions.example/grammars/city.gram"/>
<prompt>From which city are you leaving?</prompt>
… etc. …
</field>
… etc. …
</form>
| Attributes |
| Name |
Value |
Description |
| name |
PCDATA |
The name of a form item variable used to track whether the <initial> is eligable to execute; defaults to an inaccessible internal variable. |
| expr |
PCDATA |
The initial value of the form item variable; default is ECMAScript
undefined. If initialized to a value, then the form item will not be
visited unless the form item variable is cleared. |
| cond |
boolean |
A boolean condition that must also evaluate to true in order for the form item to be visited. |
Back to Tag Listing
|
|