<form>

Description

Forms are key components in VoiceXML applications.  Forms collect user input and present information to the user.  A form can define a field item (for collecting user input), or a control item (containing procedural items to help collect inputs).

Syntax


<form id="string" scope="dialog" | "document" cleardtmf="boolean"> child elements </form>

Attributes

Attribute

Description

id

The name of this form.  If specified, it can be referenced within the same document or from another document.  For example, <form id="hello"> can be referenced by <goto next="#hello"/>.  Optional.

scope

The scope of the form's grammars.  Optional.  (Defaults to dialog.)

  • dialog - The form's grammars are only active within the form.
  • document - The form's grammars are active throughout the document. If the current page is an application root document, then the form grammars are active throughout the application.

cleardtmf

Specifies whether or not the DTMF buffer should be cleared on entry to this form or whether any remaining DTMF inputs from previous forms should be carried over to this form.  Set to true to clear the buffer; set to false to carry over DTMF input.  Optional.  (Defaults to false.)

A platform extension.

Attribute Notes

Parents

Vxml

Children

Block Catch Data Error Field Filled Grammar Help Initial Link Noinput Nomatch Object Property Record Script Subdialog Transfer Var

VoiceGenie Extensions

Limitations/Restrictions

None

Example


<?xml version="1.0"?> <vxml version="2.0" xmlns="http://www.w3.org/2001/vxml"> <form id="first"> <block> This is a form. <goto next="#second"/> </block> </form> <form id="second"> <block> This is another form. </block> </form> </vxml>