Plum DEV Documentation


This shows you the differences between two versions of the page.

Link to this comparison view

voicexml:tags:option [2014/05/29 18:49]
jennifer added meta description
voicexml:tags:option [2019/09/17 12:29]
Line 1: Line 1:
-{{description>​‹option› VoiceXML tag details, attributes and VXML code example | An option list is represented by a set of option elements in a field element.}} 
-An option list is represented by a set of <​option>​ elements contained in a <​field>​ element. Each <​option>​ element contains PCDATA that is used to generate a speech grammar. 
-| dtmf | The DTMF sequence for this option. It is equivalent to a simple DTMF <​grammar>,​ and DTMF properties apply to recognition of the sequence. | 
-| value | The string to assign to the field'​s form item variable when a user selects this option, whether by speech or DTMF. The default assignment is the CDATA content of the <​option>​ element, with leading and trailing white space removed. If this does not exist, then the DTMF sequence is used instead. | 
-| accept | (defaults to "​exact"​) When set to "​exact",​ the text of the option element defines the exact phrase to be recognized. When set to "​approximate",​ the text of the option element defines an approximate recognition phrase. | 
-<?xml version="​1.0"?>​ 
-<vxml version="​2.0">​ 
-  <​form>​ 
-    <field name="​maincourse">​ 
-      <​prompt>​ 
-        Please select an entree. 
-      <​enumerate>​ 
-        For <value expr="​_prompt"/>,​ press <value expr="​_dtmf"/>​ or say <value expr="​_prompt"/>​. 
-      </​enumerate>​ 
-      </​prompt>​ 
-      <option value="​fish"​ dtmf="​1">​ swordfish steak </​option>​ 
-      <option value="​beef"​ dtmf="​2">​ roast beef </​option>​ 
-      <option value="​chicken"​ dtmf="​3">​ frog legs </​option>​ 
-      <​filled>​ 
-        You chose <value expr="​maincourse"/>​. 
-      </​filled>​ 
-    </​field>​ 
-  </​form>​ 
-The output of the above script would be: 
-Computer: Please select an entree. For swordfish steak, press 1 or say swordfish steak. For roast beef, press 2 or say roast beef. For frog legs, press 3 or say frog legs. \\ 
-Human: <user enters: 1> \\ 
-Computer: You chose fish. \\ 
-====Child Tags==== 
-====Parent Tags====