< option >

The <option> element specifies an option in a <field>. It is a convenient way to specify a list of choices in a field without specifying a grammar. The grammar is generated automatically from the text contained in each <option>.

dtmf="DTMF sequence"
dtmfThe dtmf attribute is the DTMF sequence for this option. This attribute is optional, yet is required if the menu has the dtmf attribute that is true.
valueThe value attribute is the string to assign to the field item variable. This option is selected, whether by speech or DTMF. This attribute is optional and defaults to the dtmf attribute if specified. Otherwise, it defaults to the option text with leading and trailing white space removed.
The attribute dtmf is required, if the menu has the dtmf attribute that is true.
<?xml version="1.0"?>
<vxml version="2.0" xmlns="">
  <field name="maincourse">
     Please select an entree. Today, we're featuring:
   <option dtmf="1" value="fish"> swordfish </option>
   <option dtmf="2" value="beef"> roast beef </option>
   <option dtmf="3" value="frog"> frog legs </option>
     <value expr="maincourse"/>, good choice.
     Please enjoy your meal.
    <submit next="maincourse.cgi"
     method="post" namelist="maincourse"/>
  • developer_guide/voicexml_references/elements/option.txt
  • Last modified: 2015/10/27 21:40
  • by borja