form element

Contains a series of field items to be filled through interaction with the user.


id = "string"
scope = "document_dialog"   



DEPRECATED. Controls whether the dialog is added to a history list. Please read the Implementing ‘Go Back’ tutorial to learn how to implement your own history list.


Required. The name of the form, unique to the document in which it is contained. Use the id as an anchor to jump to with a goto directive.


The default scope of the form element's grammars.

dialogIndicates that the form's grammars are active only within that form.
documentIndicates that the form's grammars are active within any dialog in the same document. If the document is specified as the application root document, the grammar is active within all documents of the application.




block, catch, data, error, field, filled, grammar, help, initial, link, noinput, nomatch, object, property, record, script, subdialog, transfer, var


The form element contains the core logic of your voice application, including grammars, prompts, and code to execute based on the user's response. When the Tellme Platform loads a VoiceXML document, it executes the first form element in document source order. Subsequent dialogs in the document must be navigated to explicitly using the goto element or the subdialog element if the target dialog is a subdialog.

The scope of individual grammar elements takes precedence over the form's scope. For example, if the form's scope is set to dialog, but the scope of the grammar within the form is set to document, the grammar is active within any dialog in the document.

If a filled element inside a form element occurs before a filled element inside a field, then the form's filled element takes precedence.


This example shows the most basic use of the form element; it simply says "Hello, world" and exits.

<?xml version="1.0"?>
<vxml version="2.1"
   <!-- The classic "Hello, world" application -->
          Hello, world 
         <!-- automatically returns to the Tellme menu -->

This example shows how to navigate between forms. Using the id attribute, you can reference a form explicitly. Note that it is necessary to use a goto or submit to move between forms.

<?xml version="1.0"?>
<vxml version="2.1"
    <!-- Greet the world -->
    <form id="hello">
             Hello world 

            <!-- navigate to the next form -->
            <!-- without a goto, interpreter exits -->
            <goto next="#welcome" />

    <!-- Welcome the user to 555-TELL -->
    <form id="welcome">
             Welcome to Tell me 
            <exit />