Any form posted to Irma can have input fields with any name not containing
spaces. The script also defines a series of variables that can be used
inside expressions with any Irma tag.
Table 4-1. Variables
| ip |
ip address of the form sender |
| date |
server date and time at the moment of the post;
if you are using Irma remotely @ vestris.com, the server time
is EST (GMT -5) |
| confirm |
empty if not a confirmation step, for more information
about automating confirmations with Irma, see
the section called Automating Confirmation
in Chapter 2
|
| errors |
list of field names with missing data; a mandatory field's name
ends with a * sign; if all data is present, the value of this field
is empty |
| inherit |
allows to inherit previously posted data and output it
as a series of
<input name="name" type="hidden" value="value"> tags
|
The value of a variable can be shown with a $ or a £ sign.
The $ sign is used to show the value of a variable.
The £ sign is used to query the value of a variable without showing it.
Expressions are evaluated left to right, grouped by [ ] signs, which are optional.
If the value of a variable is not empty, the following terms are evaluated
and shown in order: the term after ~, the value
of the variable if used with a $ sign and the term after #.
If the value of a variable is empty, the term after ^ is evaluated and shown.
For example, to obtain a mail link or a no email
text, use:
$email~[<a href="mailto:]^[no e-mail]
£email~[">$name</a>]
|
You can combine variables with operators, defined below:
Table 4-2. Operators
| HAS |
followed by a string that must be part of the term,
otherwise term is truncated |
| IS |
followed by a string that must be equal to term,
otherwise term is truncated |
| NOT |
opposite effect of IS |
| TRIM |
trim spaces on both left and right |
| TRIM32 |
trim spaces, carriage returns and line feeds
on both left and right |
To combine variables and operators, use the | separator.
The example below will show the email address or an error, depending
on whether it does or does not contain an @ sign.
$email|[HAS@]^[E-Mail must
contain an @ sign!]~[Email was: ]
|
You can chain multiple operators by separating them with commas.
To show special characters, use a \ (backslash) sign before them,
for example, to show a $ sign:
The amount of $value\$ will be charged.
|
|
Irma variables can contain dots and other special characters.
Thus $variable. will be interpreted as having a name
variable.
. If you want to add a dot to a
sentence, use $variable\.
|