Online Chat
 Call Us: 
1-877-744-1221
Browse Submit a Ticket
 
Advanced Search
Tools
Rss Categories

Predefined Variables

Author: Eileen Wilde Reference Number: AA-00178 Views: 12458 Last Updated: 08/04/2015 02:08 PM 0 Rating/ Voters

Predefined Variables

There are some predefined, dynamically generated variables for your use in templates.

  1. Date
  2. Time
  3. Fields List in HTML
  4. Fields List in Plain Text
  5. HTTP Referrer
  6. HTTP User Agent
  7. Remote IP
  8. Script Url
  9. Timestamp
  10. Unique Reference Number

Date

Returns the current date.

Syntax:

{#%DATE#}

The format should be specified by setting "date_format" in the configuration file. You can use following common examples of the "date_format" setting and get the corresponding date value output.

Examples (Assuming today is: March 10th, 2001):

date_format = F j, Y

March 10, 2001

date_format = m.d.y

03.10.01

date_format = j, n, Y

10, 3, 2001

date_format = Ymd

20010310

date_format = \I\t \i\s \t\h\e jS \d\a\y.

It is the 10th day.

date_format = D M j Y

Sat Mar 10 2001

Time

Returns the current time.

Syntax:

{#%TIME#}

The format should be specified by setting "time_format" in configuration file. You can use the following common examples of the "time_format" setting and get the corresponding time value output.

Examples (Assuming the current time is: 5:16:18 pm):

time_format = g:i a

5:16 pm

time_format = G:i:s

17:16:18

time_format = G-i

17-16

Fields List in HTML

Returns all form fields and their values in HTML format.

Example:

{#%FIELDS_LIST_HTML#}

Result:

<b>Field1_Name:</b> Field1_value<br>
<b>Field2_Name:</b> Field2_value<br>

Fields List in Plain Text

Returns all form fields and their values in Plain Text format.

Example:

{#%FIELDS_LIST_PLAIN#}

Result:

Field1_Name: Field1_Value
Field2_Name: Field2_Value

HTTP Referrer

Returns the current form URL

Example:

{#%HTTP_REFERRER#}

HTTP User Agent

Returns the submitter's user agent: OS Type & Version, Browser Type & Version.

Example:

{#%HTTP_USER_AGENT#}

Result

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.2) Gecko/20070219 Firefox/2.0.0.2

Remote IP

Returns submitter's IP address.

Example:

{#%REMOTE_ADDR#}

Result:

192.168.0.1

Script Url

Returns URL to script (to Form Processor Pro).

Example:

{#%SCRIPT_PATH#}

Timestamp

Returns the UNIX-timestamp value. Should be used with the date_format modifier to set desired format.

Example:

{#%TIMESTAMP#}

Unique Reference Number

Returns a unique reference number. It may be used for your own records.

Example (in config.php):

unique_reference_number = var_name 

So you can use {#var_name#} at any of your templates to show unique reference number.