Generates a grammar for a simple response to field options.
<option
accept = "{exact | approximate}"
dtmf = "CDATA"
value = "CDATA"
/>
Attribute |
Data Type |
Required? |
Default |
Description |
accept |
{approximate | exact} |
no |
exact |
Determines how the option is activated. Valid values:
|
dtmf |
CDATA |
no |
NA |
DTMF sequence for this option. |
value |
CDATA |
no |
NA |
String to assign to the field item variable when a user selects this option by speech or DTMF. |
If the dtmf attribute is unspecified, the option cannot be matched using DTMF.
If the value attribute is unspecified, the VoiceXML Interpreter assigns default data to the option as follows:
Uses the CDATA content of the <option> element with leading and trailing white space removed.
If CDATA content does not exist, then the VoiceXML Interpreter uses the DTMF sequence.
If neither the CDATA content nor a DTMF sequence is specified, then the default assignment is undefined and the field's form item variable is not filled.
None.
<?xml version="1.0"?>
<vxml version="2.1" xmlns="http://www.w3.org/2001/vxml">
<meta name="author" content=""/>
<meta name="maintainer" content=""/>
<form id="options">
<catch event="nomatch noinput">
<prompt> Please select an option. </prompt>
<reprompt/>
</catch>
<field name="myOption">
<prompt>
Please select from the following list: <enumerate/>
</prompt>
<option value="inquiry"> billing inquiry </option>
<option value="statement"> last statement </option>
<option value="balance"> current balance </option>
<option value="support"> customer support </option>
<filled>
<prompt>You chose <value expr="myOption"/> </prompt>
</filled>
</field>
</form>
</vxml>