Plum DEV Documentation


The <return> element ends execution of a subdialog and returns control and data to a calling dialog.


namelist Variable names to be returned to calling dialog. The default is to return no variables; this means the caller will receive an empty ECMAScript object.
event Return, then throw this event.
eventexpr This attribute is not supported.
message This attribute is not supported.
messageexpr This attribute is not supported.




<?xml version="1.0"?>
<vxml version="2.0">
  <!-- form dialog that calls a subdialog -->
  <var name="myname" expr="'Jane Doe'"/>
    <subdialog name="result" src="#getdriverslicense" namelist="myname">
      <param name="birthday" expr="'February 10th, 1970'"/>
        <!-- Reference returned variables as ECMAscript -->
        <!-- member variables of the field name "result". -->
        You entered <value expr="result.drivelicense"/>.
        <submit next=""
          namelist="result.drivelicense birthday"/>

  <!-- subdialog to get drivers license -->
  <form id="getdriverslicense">
    <var name="birthday"/>
    <field name="drivelicense" type="digits">
        <value expr="myname"/>,
        your birthdate is: <value expr="birthday"/>.
        Please say your driver's license number.
        <!-- All variables specified in the "return" tag's -->
        <!-- "namelist" attribute will be returned to the -->
        <!-- calling dialog. -->
        <return namelist="drivelicense"/>

The output of the above script would be:

Computer: Jane Doe, your birthdate is: February 10th, 1970.
Computer: Please say your driver's license number.
Human: One two three four five six seven eight nine.
Computer: You entered one hundred twenty-three million, four hundred fifty-six thousand, seven hundred eighty-nine.
(continues on to processing form…)

Child Tags


Parent Tags