We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics

What is the difference between using <param> or nameli

Answers to common Plum DEV questions

Moderators: admin, support

Locked
support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

What is the difference between using <param> or nameli

Post by support »

The <param> tag submits data to a <subdialog> (or <object>) without the need for an HTTP request or server-side scripting. Any data passed via <param> is available as a series of variables in the (new) <subdialog> context. E.g.:

Code: Select all

<form id="test">
  <var name="var1" expr="'tooth'" />
  <var name="var2" expr="'brush'" />
  <subdialog name="call_sub" src="#sub_form">
    <param name="param1" expr="var1" />
    <param name="param2" expr="var2" />
    <filled>
      The concatenation of var 1 and var 2 is
      <value expr="call_sub.retval" />
    </filled>
  </subdialog>
</form>
<form id="sub_form">
  <var name="param1" />
  <var name="param2" />
  <!-- new variable holds concatenation of param1 and param2 -->
  <var name="retval" expr="param1+param2" />
  <block>
    <return namelist="retval" />
  </block>
</form>
Variables passed by using the "namelist" attribute (of either a <subdialog> or <submit> tag) are submitted via HTTP along with the request to the URI specified by src. In this case, it is necessary to use server-side scripting to retrieve and manipulate the values of the variables.

In the context of a <subdialog>, "namelist" is only valid if src references a URI to another document (i.e. requires an actual HTTP request to be made).

Locked