LogoLogo
  • Go to Docs Center
  • Plum DEV Documentation
  • Overview
  • Developer Reference
    • Tutorial
    • How to...
      • Use Plum's Transcription API
    • Audio Formats and Prompts
    • Grammars and Speech Recognition
    • Available ASR Engines
    • TTS Engine Characteristics
      • Amazon Polly TTS Engine
        • Polly Voice Tag Attribute Details
      • AT&T Natural Voices
      • Cepstral Engine
      • RealSpeak Engine
      • Vocalizer 7
        • Vocalizer 7: <voice> tag and SSML Support
    • Data Exchange
    • Logging
    • Caching
    • Root Documents
  • VoiceXML
    • Tags
      • <assign>
      • <audio>
      • <block>
      • <break>
      • <catch>
      • <choice>
      • <clear>
      • <data>
      • <desc>
      • <disconnect>
      • <else>
      • <elseif>
      • <emphasis>
      • <enumerate>
      • <error>
      • <example>
      • <exit>
      • <field>
      • <filled>
      • <foreach>
      • <form>
      • <goto>
      • <grammar>
      • <help>
      • <if>
      • <initial>
      • <item>
      • <lexicon>
      • <link>
      • <log>
      • <mark>
      • <menu>
      • <meta>
      • <metadata>
      • <noinput>
      • <nomatch>
      • <one-of>
      • <option>
      • <paragraph>
      • <param>
      • <phoneme>
      • <prompt>
      • <property>
      • <prosody>
      • <record>
      • <reprompt>
      • <return>
      • <rule>
      • <ruleref>
      • <say-as>
      • <script>
      • <sentence>
      • <speak>
      • <sub>
      • <subdialog>
      • <submit>
      • <tag>
      • <throw>
      • <token>
      • <transfer>
      • <value>
      • <var>
      • <voice>
      • <vxml>
    • Properties
      • audiofetchhint
      • audiomaxage
      • audiomaxstale
      • bargein
      • bargeintype
      • certverifypeer
      • completetimeout
      • confidencelevel
      • datafetchhint
      • datamaxage
      • datamaxstale
      • documentfetchhint
      • documentmaxage
      • documentmaxstale
      • fetchaudio
      • fetchaudiodelay
      • fetchaudiominimum
      • fetchtimeout
      • grammarfetchhint
      • grammarmaxage
      • grammarmaxstale
      • incompletetimeout
      • inputmodes
      • interdigittimeout
      • logging
      • maxnbest
      • maxspeechtimeout
      • normalizeaudio
      • recordcall
      • recordcallappend
      • recordutterance
      • recordutterancetype
      • scriptfetchhint
      • scriptmaxage
      • scriptmaxstale
      • sensitivity
      • speedvsaccuracy
      • termchar
      • termmaxdigits
      • termtimeout
      • timeout
      • universals
      • voicegender
      • voicename
    • Application and Session Variables
      • application.lastresult$[i].confidence
      • application.lastresult$[i].inputmode
      • application.lastresult$[i].interpretation
      • application.lastresult$[i].recording
      • application.lastresult$[i].recordingduration
      • application.lastresult$[i].recordingsize
      • application.lastresult$[i].utterance
      • session.callrecording
      • session.id
      • session.telephone.ani
      • session.telephone.dnis
    • VoiceXML Resources
  • Plum DEV Guide
    • Using the Plum DEV site
    • Using the File Repository
    • Outbound Calling Guide
      • Using the Outbound Tools in the DEV web UI
      • DEV Outbound Programming Notes
      • Outbound FAQs and Tips
    • Call Reporting
    • Analytics
    • VoiceTrends
    • Debugging
    • Scratchpads
    • Saved URLs
    • Voice Biometrics
    • Call Routing
    • Data Security
      • 'Private' Tags
      • Managing Secure Phone Numbers
      • Sensitive Data Types
    • SMS Guide
      • Standard Short Codes
      • SMS Debugging/Error Logs
      • Additional SMS Info
    • Single Sign On
  • Plum DEV APIs
    • DEV Outbound APIs
      • Contacts CSV Formatting
      • Outbound API Parameter Notes
      • Legacy and Miscellaneous Notes
    • SMS API
    • Call Logs API
    • Call Scheduling and Pacing API
    • Transcription API
    • Application API
    • Blocklist API
Powered by GitBook
On this page
  • <form>
  • Attributes
  • Notes
  • Example
  • Child Tags
  • Parent Tags
  1. VoiceXML
  2. Tags

<form>

<form>

Forms are the key components of VoiceXML documents. A form contains:

  • A set of form items, elements that are visited in the main loop of the form interpretation algorithm. Form items are subdivided into input items that can be “filled” by user input and control items that cannot.

  • Declarations of non-form item variables.

  • Event handlers.

  • “Filled” actions, blocks of procedural logic that execute when certain combinations of input item variables are assigned.

Attributes

Name
Data type
Description

id

String

The name of the form. If specified, the form can be referenced within the document or from another document. For instance <form id=“weather”>, <goto next=“#weather”>.

Note: This attribute does not allow any white space.

scope

String

The default scope of the form's grammars. Accepted values include "dialog" and "document".

If set to "dialog", then the form grammars are active only in the form. If set to "document", then the form grammars are active during any dialog in the same document.

If scope is set to "document", and the document is an application root document, then the form grammars are active during any dialog in any document of this application.

The scope of individual form grammars takes precedence over the default scope. For example, in non-root documents, given a form with the default scope “dialog” and a form grammar with the scope “document”, that grammar is active in any dialog in the document.

Notes

The id attribute for this tag does not allow any white space.

Example

<?xml version="1.0"?>
<vxml version="2.0">
  <form id="firstform">
    <block>
      <prompt>
        Welcome! Let's move to a form where we gather some input.
      </prompt>
      <!-- A "#" symbol followed by an identifier specifies a -->
      <!-- form or menu ID to jump to. -->
      <goto next="#thirdform"/>
    </block>
  </form>

  <form id="secondform">
    <block>
      <prompt>
        You've made it to the final form! Goodbye.
      </prompt>
      <disconnect/>
    </block>
  </form>

  <form id="thirdform">
    <field name="lucky_number" type="digits?length=1">
      <prompt>
        Enter your lucky number.
      </prompt>
      <filled>
        <prompt>
          Your lucky number is <value expr="lucky_number"/>. Let's move on to another form.
        </prompt>
        <goto next="#secondform"/>
      </filled>
      <catch event="nomatch noinput" count="1,2">
        <prompt>
          Your lucky number should be 1 digit. Let's try again.
        </prompt>
        <reprompt/>
      </catch>
      <catch event="nomatch noinput" count="3">
        <prompt>
          I guess you don't have a lucky number. Let's move on to the next form anyways.
        </prompt>
        <goto next="#secondform"/>
      </catch>
    </field>
  </form>
</vxml>

The output of the above script would be:

Computer: Welcome! Let's move to a form where we gather some input. Computer: Enter your lucky number. User: <user enters: 3> Computer: Your lucky number is 3. Let's move on to another form. Computer: You've made it to the final form! Goodbye.

Child Tags

Parent Tags

Previous<foreach>Next<goto>

Last updated 1 year ago

, , , , , , , , , , , , , , , , ,

<block>
<catch>
<data>
<error>
<field>
<filled>
<grammar>
<help>
<initial>
<link>
<noinput>
<nomatch>
<property>
<record>
<script>
<subdialog>
<transfer>
<var>
<vxml>