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> and the optionally specified dtmf sequence in each <option>.
<option
dtmf="DTMF_sequence"
accept="exact" | "approximate"
value="string">
text
</option>
|
|
Attribute |
Description |
|
dtmf |
A DTMF sequence to select this option. Optional. |
|
accept |
Specifies how to generate the grammar for this
|
|
value |
The string to assign to the field variable when this option is selected, either by speech or DTMF. Optional. (Defaults to the option text with leading and trailing white space removed, if specified. Otherwise, defaults to the value of the dtmf attribute.) |
#PCDATA
None
<?xml version="1.0"?>
<vxml version="2.0" xmlns="http://www.w3.org/2001/vxml">
<form>
<field name="maincourse">
<prompt>
Please select either sword fish or roast beef.
</prompt>
<option dtmf="1"> sword fish </option>
<option dtmf="2"> roast beef </option>
<filled>
Very good.
I'll bring out your <value expr="maincourse"/>.
</filled>
</field>
</form>
</vxml>
|