# \<param>

## \<param> <a href="#param" id="param"></a>

The `<param>` element is used to specify values that are passed to subdialogs.

### Attributes

<table><thead><tr><th width="166.33333333333331">Name</th><th width="151">Data type<select><option value="c9416a7f82664d52bb89ce66fe71fb66" label="String" color="blue"></option><option value="6f8c4a3144a445339edac37dfd8aed38" label="Integer" color="blue"></option><option value="c116ac70255e47ecab3666053f729e18" label="Boolean" color="blue"></option></select></th><th>Description</th></tr></thead><tbody><tr><td>name</td><td><span data-option="c9416a7f82664d52bb89ce66fe71fb66">String</span></td><td>The name to be associated with this parameter when subdialog is invoked.</td></tr><tr><td>expr</td><td><span data-option="c9416a7f82664d52bb89ce66fe71fb66">String</span></td><td>An expression that computes the value associated with name.</td></tr><tr><td>value</td><td><span data-option="c9416a7f82664d52bb89ce66fe71fb66">String</span></td><td>Associates a literal string value with name.</td></tr><tr><td>valuetype</td><td><span data-option="c9416a7f82664d52bb89ce66fe71fb66">String</span></td><td><p>(defaults to “data”) Either data or ref; used to indicate to an object if the value associated with name is data or a URI (ref).</p><p></p><p>This is not used for <code>&#x3C;subdialog></code> since values are always data.</p></td></tr></tbody></table>

### Notes

The `<param>` elements of a `<subdialog>` specify the parameters to pass to the subdialog. These parameters must be declared in the subdialog using `<var>` elements; it is a semantic error to attempt to set a form item variable or an undeclared variable using `<param>`.&#x20;

When a subdialog initializes, its variables are initialized in document order to the value specified by the `<param>` element with the corresponding name. The parameter values are computed by evaluating the `<param>` expr attribute in the context of the `<param>` element. An expr attribute in the `<var>` element is ignored in this case.

If no corresponding `<param>` is specified to `<var>` element, an expr attribute is used as a default value, or the variable is undefined if the expr attribute is unspecified as with the regular `<form>` element.

### Example

```markup
<?xml version="1.0"?>
<vxml version="2.0">
  <!-- form dialog that calls a subdialog -->
  <var name="myname" expr="'Jane Doe'"/>
  <form>
    <subdialog name="result" src="#getdriverslicense" namelist="myname">
      <!-- This will send the variable "birthday" to the -->
      <!-- subdialog "#getdriverslicense". -->
      <param name="birthday" expr="'February 10th, 1970'"/>
      <filled>
        You entered <value expr="result.drivelicense"/>.
        <submit next="http://nonexistent.domain.com/process.pl"
          method="post"
          namelist="result.drivelicense birthday"/>
      </filled>
    </subdialog>
  </form>
  <!-- subdialog to get drivers license -->
  <form id="getdriverslicense">
    <!-- In order to receive parameters sent from a "subdialog" tag, -->
    <!-- the parameters must be declared within the subdialog with the -->
    <!-- exact same name. -->
    <var name="birthday"/>
    <field name="drivelicense" type="digits">
      <prompt>
        <value expr="myname"/>,
        your birthdate is: <value expr="birthday"/>.
        Please say your driver's license number.
      </prompt>
      <filled>
        <return namelist="drivelicense"/>
      </filled>
    </field>
  </form>
</vxml>
```

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

None

### Parent Tags

[\<subdialog>](/dev/voicexml/tags/subdialog-tag.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.plumvoice.com/dev/voicexml/tags/param-tag.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
