Differences

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

Link to this comparison view

developer_guide:voicexml_references:elements:return [2015/10/27 21:43] (current)
borja created
Line 1: Line 1:
 +====== < return > ======
  
 +===== Description =====
 +
 +The <​return>​ element completes the execution of <​subdialog>​ and returns control and data to a calling dialog.
 +
 +===== Syntax =====
 +
 +<​code>​
 +<return
 +event="​event"​
 +namelist="​variable1 variable2 ..."/>​
 +</​code>​
 +
 +===== Attributes =====
 +
 +|event|Return and throw this event. Optional.|
 +|namelist|Space-separated list of variables to be returned to the calling dialog. Optional (Defaults to no variables)|
 +
 +===== Parents =====
 +
 +<​code>​
 +<​block>,​ <​catch>,​ <​error>,​ <​filled>,​ <​help>,​ <if>, <​noinput>,​ <​nomatch>​
 +</​code>​
 +
 +===== Children =====
 +
 +<​code>​
 +None.
 +</​code>​
 +
 +===== Extensions =====
 +
 +<​code>​
 +None.
 +</​code>​
 +
 +===== Limitations/​Restrictions =====
 +
 +<​code>​
 +None.
 +</​code>​
 +
 +===== Example Code =====
 +
 +The following shows the document that calls the subdialog:
 +<​code>​
 +<?xml version="​1.0"?>​
 +<vxml version="​2.0"​ xmlns="​http://​www.w3.org/​2001/​vxml">​
 +<​form>​
 + <​subdialog name="​result"​ src="​subdialog.vxml">​
 +  <​filled>​
 +   <​prompt>​Your account number is <value expr="​result.acctnum"/>​
 +    Your phone number is <value expr="​result.acctphone"/>​
 +   </​prompt>​
 +  </​filled>​
 + </​subdialog>​
 +</​form>​
 +</​vxml>​
 +</​code>​
 +
 +The following shows the document containing the subdialog:
 +<​code>​
 +<?xml version="​1.0"?>​
 +<vxml version="​2.0"​ xmlns="​http://​www.w3.org/​2001/​vxml">​
 +<form id="​basic">​
 + <​field name="​acctnum"​ type="​digits">​
 +  <​prompt> ​
 +    What is your account number? ​
 +  </​prompt>​
 + </​field>​
 + <​field name="​acctphone"​ type="​phone">​
 +  <​prompt>​
 +    What is your home telephone number?
 +  </​prompt>​
 +  <​filled>​
 +   <​return namelist="​acctnum acctphone"/>​
 +  </​filled>​
 + </​field>​
 +</​form>​
 +</​vxml>​
 +</​code>​