developer_guide:voicexml_references:elements:form

< form >

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 (contains procedural items to help collect inputs).

<form
id="String"
scope="dialog" | "document"
cleardtmf="true" | "false">
child elements
</form>
idThe id attribute defines the name of the form. If specified, it can be referenced within the same document or from another document. e.g. <form id=“hello”> can be referenced as <goto next=“#hello”/>. This attribute is optional.
scopeThe scope attribute defines the scope of the form’s grammar. This attribute is optional and 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 this is an application root document, then the form grammars are active throughout the application.
<vxml>
<block>, <catch>, <error>, <field>, <filled>, <grammar>, <help>, <initial>, <link>, <noinput>, <nomatch>, <object>, <property>, <record>, <script>, <subdialog>, <transfer>, <var>
None.
None.
<?xml version="1.0"?>
<vxml version="2.0" xmlns="http://www.w3.org/2001/vxml">
 <form id="first">
  <block>
   <prompt>Hi, this is the first form</prompt>
   <goto next="#second"/>
  </block>
 </form>
 <form id="second">
  <block>
   <prompt>Thank you for coming to the second form</prompt>
  </block>
 </form>
</vxml>
  • developer_guide/voicexml_references/elements/form.txt
  • Last modified: 2015/10/27 12:37
  • by borja