Variables
Variables are used to dynamically insert the value of form fields, the results of actions, certain system properties and more. They are available to templates and most settings of actions.
As a common use case, consider a form allowing users to enter their mail addresses. When you would like to send a mail to the address they entered, variables must be used.
Using variables
Using variables for actions
Form fields can be selected by clicking on the variable icon to the right of each action setting supporting variables.
Using variables for templates
The variable selection menu can be opened either by clicking the button the the right hand side of the template editor or by pressing Ctrl + Space.
Variable types
Form elements
Syntax
This variable takes the value of the form field with the specified name. They are used mainly for actions such as Email, Create text file, Database query as well as for Templates.
Example: The variable [%tfName%] will take the value of the input field named Name.
Special form elements
There are some special variables available:
- [%xf-action%] The name of the button used for submitting the form. Could be used to execute an action in the workflow only when a certain button was used (by adding an appropriate condition to the action).
- [%lang%] Refers to the language of the form when it was filled out, eg. de, de-CH, en/ oder fr-FR.
System variables
Syntax
System variables take the value of the corresponding system value. The following system variables are available for actions and templates:
- [%$CLIENT_ID%]
- The client ID of the client of the current form.
- [%$FORM_LINK%]
- The URL of the current form.
- [%$FORM_PROCESS_LINK%]
- The URL of the current form for the current process.
- [%$FORM_VERIFY_LINK%]
- The URL to confirm Double opt in. Can only be used once.
- [%$FORM_INBOX_NAME%]
- 6.1.0+ Returns the inbox name the form record currently resides in.
- [%$PROCESS_ID%]
- The current process ID of the form record.
- [%$PROJECT_ALIAS%]"}}
- The alias of the current form.
- [%$PROJECT_ID%]
- The form ID of the current form.
- [%$PROJECT_NAME%]
- The name of the current form.
- [%$RECORD_ID%]
- The ID of the current form record.
- [%$SOURCE_SERVER%]
- The name of the server that has provided the current form, either the name of the frontend server or the local server.
- [%$SOURCE_SERVER_URL%]
- The URL of the server that has provided the current form, either the name of the frontend server