Note: This article is about variables used in Template Events and other template use cases. For variables used in workflows, see here.
GoFormz supports variables that represent various properties of a form that are not known until the form is filled out. This includes the form’s field values, as well as various form metadata like the form’s name, completion timestamp, etc.
These variables can be used in Template Events and in account-level email notifications. Some of them can also be used in calculations and formulas within your templates. Usage examples include:
Automatically send an email to a form’s owner or to an email address from the form, and include form data in the email.
Tag your forms based on form field values and metadata (e.g. customer name and name of user who completed the form).
Fill a form field by doing a database lookup using a value from another form field.
Below, we review the two types of variables that are available.
Form metadata variables provide information about the form itself. Template Events support the following metadata variables:
[FORMNAME]: The name of the form.
[COMPLETEDDATE]: The timestamp when this form was completed. (If the form was completed multiple times, this will be the timestamp of the latest completion.)
[USERNAME]: The first and last name of the user who completed the form.
[EMAILADDRESS]: The email address of the user who completed the form.
[OWNER_NAME]: The first and last name of the user who owns this form.
[OWNER_EMAILADDRESS]: The email address of the user who owns this form.
In addition to the metadata variables, Template Events support field variables. These variables represent the value contained in a form field, using the form field name in square brackets as the syntax. So if, for instance, your form has a field called “Customer Name” — then [Customer Name] is the variable representing that field’s value.
In addition to the workflow use cases described above, field variables can also be used within a form in calculated fields and auto-filled fields. By contrast, the metadata variables listed above cannot be used in these use cases — a different set of environment variables is used for this purpose. See the GoFormz Calculations Guide for more on setting up calculated fields.