Presents information and collects data.
<form
id="string"
scope="document"|"dialog"
>
Child Elements
</form>
A dialog for collecting user input.
Note that when you reach the end of a form, execution does not proceed to the next form on the page. If you do not explicitly transition to another dialog using <goto> or <submit>, then the application terminates when the form completes.
When execution leaves a form, all variables whose scope is that form go away. If you want to retain the value of a form-level variable after leaving the form, you must copy the value into a variable with document or application scope.
| Parents | Children |
|
|
error.semantic - If no grammars are active when input is expected in a form
| | VoiceXML 2.0 Specification: <form> |
| | Related tags: <field>, <block>, <record>, <transfer>, <subdialog>, <initial>, <grammar> |
<?xml version="1.0" ?>
<!DOCTYPE vxml PUBLIC "-//BeVocal Inc//VoiceXML 2.0//EN"
"http://cafe.bevocal.com/libraries/dtd/vxml2-0-bevocal.dtd">
<vxml version="2.0" xmlns="http://www.w3.org/2001/vxml">
<form id="welcome">
<block>You are in Form One. Welcome back home! </block>
<field name="hello">
<grammar type="application/x-nuance-gsl">
[next dtmf-1 start]
</grammar>
<prompt>
Say next or press one to go to Form 2 or start to start over again.
</prompt>
<filled>
<if cond="hello=='next'|| hello=='dtmf-1'">
<goto next="#comeagain"/>
<else/>
<goto next="#welcome"/>
</if>
</filled>
</field>
</form>
<form id="comeagain">
<block>You are now in Form 2.</block>
<field name="goback" type="boolean">
<grammar type="application/x-nuance-gsl">
[back dtmf-2 continue]
</grammar>
<prompt>
Say back or press two to go to Form 1 or say continue
to enter this form again.
</prompt>
<filled>
<if cond="goback=='back'|| goback=='dtmf-2'">
<prompt>Thanks for stopping by Form 2. Please come again.</prompt>
<goto next="#welcome"/>
<else/>
<goto next="#comeagain"/>
</if>
</filled>
</field>
</form>
</vxml>
| Café Home |
Developer Agreement |
Privacy Policy |
Site Map |
Terms & Conditions Part No. 520-0001-02 | © 1999-2007, BeVocal, Inc. All rights reserved | 1.877.33.VOCAL |