Page 1 of 1

How do I access the shadow variables in an input item?

Posted: Fri Jun 13, 2003 2:16 pm
by support
Input items (<field> tags, <record> tags, etc.) have an associated set of shadow variables which are used to return results from the execution of the input item (other than the value stored under the input item's name attribute).

A shadow variable is referenced as name$.shadowvar where name is the value of the input item’s name attribute, and shadowvar is the name of a specific shadow variable. E.g. the <record> element's "duration" variable can be accessed thusly:

Code: Select all

<form id="shadowvar_test">
  <record name="foo" beep="true">
    <prompt>
      Please record a message after the tone.
    </prompt>
    <filled>
     <if cond="foo$.duration > 10000">
       Wow, long message!
     </if>
    </filled>
  </record>
</form>