var (Read form variable)
The $var function makes it possible to read the content of a previously gesetzten Variablen in forms (e.g. in another element's behaviour).
Hint: Form flags are also variables.
Syntax
$var(varName)
Parameter
Name |
Description |
varName |
The name of the variable |
Return value
The value of the variable or null if it is not set or empty.
Example
In the following example, in a behaviour with every 'Change' (1) the content of the text field is written to a variable named 'content' (2).
When you click on the Read variable... button (3), a Calculate behaviour is executed (4), which reads the variable 'content' and passes it to a Show alert action (5), which displays this value.
Result: