Variables Reference

WS Form variables enable you to add dynamic content to various elements of your form such as default field values and email templates.

Areas where WS Form variables can be used are normally accompanied by a field lookup icon [TO DO: Insert hamburger icon]. By clicking this icon, a list of the available variables will be shown below the corresponding field. Click on a variable will insert it into the field you are editing.

All WS Form variables start with the ‘#’ character. For example:

#blog_name

Some variables take additional parameters. For example:

#field(123)

If a variable takes more than one parameter, you separate those values with a comma. For example:

#email_submission(true,true,true)

If a variable parameter contains a comma, you should encase it in double quotes. For example:

#server_date_custom("Y-m-d")

WS Form Variable List

The following variables are available for use in WS Form.

Name / VariableAdditional Information
Repeater Field
#acf_repeater_field(parent_field, sub_field)
Used to obtain an ACF repeater field. You can separate parent_fields with commas to access deep variables.
Display Name
#author_display_name
Email
#author_email
First Name
#author_first_name
ID
#author_id
Last Name
#author_last_name
Nickname
#author_nickname
Admin Email
#blog_admin_email
Character Set
#blog_charset
Current Date
#blog_date
Returns the blog date in the format configured in WordPress.
Current Time
#blog_time
Returns the blog time in the format configured in WordPress.
Custom Date
#blog_date_custom(format)
Returns the blog date and time in a specified format (PHP date format). For more information about this variable, click here.
Language
#blog_language
Name
#blog_name
URL
#blog_url
Calculation
#calc(calculation)
Calculated value.
Count
#character_count
The total character count. For more information about this variable, click here. This variable can only be used in the Help setting for text based Fields.
Count Label
#character_count_label
Shows 'character' or 'characters' depending on the character count. For more information about this variable, click here. This variable can only be used in the Help setting for text based Fields.
Count Remaining
#character_remaining
If you set a maximum character length for a field, this will show the total remaining character count. For more information about this variable, click here. This variable can only be used in the Help setting for text based Fields.
Count Remaining Label
#character_remaining_label
If you set a maximum character length for a field, this will show the total remaining character count. For more information about this variable, click here. This variable can only be used in the Help setting for text based Fields.
Maximum
#character_max
Shows the maximum character length that you set for a field. For more information about this variable, click here. This variable can only be used in the Help setting for text based Fields.
Maximum Label
#character_max_label
Shows 'character' or 'characters' depending on the maximum character length. For more information about this variable, click here. This variable can only be used in the Help setting for text based Fields.
Minimum
#character_min
Shows the minimum character length that you set for a field. For more information about this variable, click here. This variable can only be used in the Help setting for text based Fields.
Minimum Label
#character_min_label
Shows 'character' or 'characters' depending on the minimum character length. For more information about this variable, click here. This variable can only be used in the Help setting for text based Fields.
Checkbox Label
#checkbox_label(id, delimiter)
Use this variable to pull back the label of a checkbox field on your form. For example: #checkbox_label(123) where '123' is the field ID shown in the layout editor. This variable can only be used in client-side.
Current Date
#client_date
Returns the users web browser local date in the format configured in WordPress. This variable can only be used in client-side.
Current Time
#client_time
Returns the users web browser local time in the format configured in WordPress. This variable can only be used in client-side.
Custom Date
#client_date_custom(format)
Returns the users web browser local date and time in a specified format (PHP date format). For more information about this variable, click here. This variable can only be used in client-side.
Currency Symbol
#ecommerce_currency_symbol
Use this variable to show the current currency symbol.
Discount
#ecommerce_cart_discount
Excludes currency symbol. Use this in conditional logic or email templates.
Discount (Currency)
#ecommerce_cart_discount_currency
Includes currency symbol. Use this in conditional logic or email templates.
Discount (Span Currency)
#ecommerce_cart_discount_span_currency
Includes currency symbol. This variable outputs a span that can be used in Text Editor or HTML fields.
Discount (Span)
#ecommerce_cart_discount_span
Excludes currency symbol. This variable outputs a span that can be used in Text Editor or HTML fields.
Field Value as Price
#ecommerce_field_price(id)
Use this variable to pull back the value of a price field on your form. For example: #field(123) where '123' is the field ID shown in the layout editor. This variable will neatly format a currency value according to your E-Commerce settings. An example output might be: 123.00
Gift Wrap
#ecommerce_cart_gift_wrap
Excludes currency symbol. Use this in conditional logic or email templates.
Gift Wrap (Currency)
#ecommerce_cart_gift_wrap_currency
Includes currency symbol. Use this in conditional logic or email templates.
Gift Wrap (Span Currency)
#ecommerce_cart_gift_wrap_span_currency
Includes currency symbol. This variable outputs a span that can be used in Text Editor or HTML fields.
Gift Wrap (Span)
#ecommerce_cart_gift_wrap_span
Excludes currency symbol. This variable outputs a span that can be used in Text Editor or HTML fields.
Handling Fee
#ecommerce_cart_handling_fee
Excludes currency symbol. Use this in conditional logic or email templates.
Handling Fee (Currency)
#ecommerce_cart_handling_fee_currency
Includes currency symbol. Use this in conditional logic or email templates.
Handling Fee (Span Currency)
#ecommerce_cart_handling_fee_span_currency
Includes currency symbol. This variable outputs a span that can be used in Text Editor or HTML fields.
Handling Fee (Span)
#ecommerce_cart_handling_fee_span
Excludes currency symbol. This variable outputs a span that can be used in Text Editor or HTML fields.
Insurance
#ecommerce_cart_insurance
Excludes currency symbol. Use this in conditional logic or email templates.
Insurance (Currency)
#ecommerce_cart_insurance_currency
Includes currency symbol. Use this in conditional logic or email templates.
Insurance (Span Currency)
#ecommerce_cart_insurance_span_currency
Includes currency symbol. This variable outputs a span that can be used in Text Editor or HTML fields.
Insurance (Span)
#ecommerce_cart_insurance_span
Excludes currency symbol. This variable outputs a span that can be used in Text Editor or HTML fields.
Other
#ecommerce_cart_other
Excludes currency symbol. Use this in conditional logic or email templates.
Other (Currency)
#ecommerce_cart_other_currency
Includes currency symbol. Use this in conditional logic or email templates.
Other (Span Currency)
#ecommerce_cart_other_span_currency
Includes currency symbol. This variable outputs a span that can be used in Text Editor or HTML fields.
Other (Span)
#ecommerce_cart_other_span
Excludes currency symbol. This variable outputs a span that can be used in Text Editor or HTML fields.
Payment Method
#ecommerce_payment_method
Excludes currency symbol. Use this in conditional logic or email templates.
Shipping
#ecommerce_cart_shipping
Excludes currency symbol. Use this in conditional logic or email templates.
Shipping (Currency)
#ecommerce_cart_shipping_currency
Includes currency symbol. Use this in conditional logic or email templates.
Shipping (Span Currency)
#ecommerce_cart_shipping_span_currency
Includes currency symbol. This variable outputs a span that can be used in Text Editor or HTML fields.
Shipping (Span)
#ecommerce_cart_shipping_span
Excludes currency symbol. This variable outputs a span that can be used in Text Editor or HTML fields.
Shipping Discount
#ecommerce_cart_shipping_discount
Excludes currency symbol. Use this in conditional logic or email templates.
Shipping Discount (Currency)
#ecommerce_cart_shipping_discount_currency
Includes currency symbol. Use this in conditional logic or email templates.
Shipping Discount (Span Currency)
#ecommerce_cart_shipping_discount_span_currency
Includes currency symbol. This variable outputs a span that can be used in Text Editor or HTML fields.
Shipping Discount (Span)
#ecommerce_cart_shipping_discount_span
Excludes currency symbol. This variable outputs a span that can be used in Text Editor or HTML fields.
Status
#ecommerce_status
Excludes currency symbol. Use this in conditional logic or email templates.
Subtotal
#ecommerce_cart_subtotal
Excludes currency symbol. Use this in conditional logic or email templates.
Subtotal (Currency)
#ecommerce_cart_subtotal_currency
Includes currency symbol. Use this in conditional logic or email templates.
Subtotal (Span Currency)
#ecommerce_cart_subtotal_span_currency
Includes currency symbol. This variable outputs a span that can be used in Text Editor or HTML fields.
Subtotal (Span)
#ecommerce_cart_subtotal_span
Excludes currency symbol. This variable outputs a span that can be used in Text Editor or HTML fields.
Tax
#ecommerce_cart_tax
Excludes currency symbol. Use this in conditional logic or email templates.
Tax (Currency)
#ecommerce_cart_tax_currency
Includes currency symbol. Use this in conditional logic or email templates.
Tax (Span Currency)
#ecommerce_cart_tax_span_currency
Includes currency symbol. This variable outputs a span that can be used in Text Editor or HTML fields.
Tax (Span)
#ecommerce_cart_tax_span
Excludes currency symbol. This variable outputs a span that can be used in Text Editor or HTML fields.
Total
#ecommerce_cart_total
Excludes currency symbol. Use this in conditional logic or email templates.
Total (Currency)
#ecommerce_cart_total_currency
Includes currency symbol. Use this in conditional logic or email templates
Total (Span Currency)
#ecommerce_cart_total_span_currency
Includes currency symbol. This variable outputs a span that can be used in Text Editor or HTML fields
Total (Span)
#ecommerce_cart_total_span
Excludes currency symbol. This variable outputs a span that can be used in Text Editor or HTML fields
Transaction ID
#ecommerce_transaction_id
Excludes currency symbol. Use this in conditional logic or email templates.
Character set
#email_charset
For more information about this variable, click here. This variable can only be used in the Send Email action.
Content type
#email_content_type
For more information about this variable, click here. This variable can only be used in the Send Email action.
E-Commerce Values
#email_ecommerce
This variable outputs a list of the e-commerce transaction details such as total, transaction ID and status fields. For more information about this variable, click here. This variable can only be used in the Send Email action.
Logo
#email_logo
For more information about this variable, click here. This variable can only be used in the Send Email action.
Pixel
#email_pixel
Outputs a transparent gif. We use this to avoid Mac Mail going into dark mode when viewing emails.
Subject
#email_subject
For more information about this variable, click here. This variable can only be used in the Send Email action.
Submitted Fields
#email_submission(tab_labels, section_labels, field_labels, blank_fields, static_fields)
This variable outputs a list of the fields captured during a submission. You can either use: #email_submission or provide additional parameters to toggle tab labels, section labels, blank fields and static fields (such as text or HTML areas of your form). Specify 'true' or 'false' for each parameter, for example: #email_submission(true, true, false, true) For more information about this variable, click here. This variable can only be used in the Send Email action.
Tracking data
#email_tracking
For more information about this variable, click here. This variable can only be used in the Send Email action.
Field Value
#field(id)
Use this variable to pull back the value of a field on your form. For example: #field(123) where '123' is the field ID shown in the layout editor.
Checksum
#form_checksum
DOM Selector ID
#form_obj_id
Framework
#form_framework
ID
#form_id
Instance ID
#form_instance_id
Label
#form_label
Session ID
#form_hash
Absolute
#abs(number)
Returns the absolute value of a number.
Average
#avg(number)
Returns the average of all the input numbers.
Ceiling
#ceil(number)
Rounds a number up to the next largest whole number.
Cosine
#cos(radians)
Returns the cosine of a radian number.
Euler's
#exp(number)
Returns E to the power of a number.
Floor
#floor(number)
Returns the largest integer value that is less than or equal to a number.
Logarithm
#log(number)
Returns the natural logarithm of a number.
PI
#pi
Returns an approximate value of PI.
Round
#round(number, decimals)
Returns the rounded value of a number.
Sine
#sin(radians)
Returns the sine of a radian number.
Square Root
#sqrt(number)
Returns the square root of the number.
Tangent
#tan(radians)
Returns the tangent of a radian number.
Admin URL
#post_url_edit
Content
#post_content
Date
#post_date
Excerpt
#post_excerpt
ID
#post_id
Meta Value
#post_meta(key)
Returns the post meta value for the key specified.
Post Custom Date
#post_date_custom(format)
For more information about this variable, click here.
Public URL
#post_url
Time
#post_time
Title
#post_title
Type
#post_type
Number (0 to 100)
#progress
For more information about this variable, click here. This variable can only be used in the Help setting for Progress fields.
Number Remaining (100 to 0)
#progress_remaining
For more information about this variable, click here. This variable can only be used in the Help setting for Progress fields.
Percent (0% to 100%)
#progress_percent
For more information about this variable, click here. This variable can only be used in the Help setting for Progress fields.
Percent Remaining (100% to 0%)
#progress_remaining_percent
For more information about this variable, click here. This variable can only be used in the Help setting for Progress fields.
Variable
#query_var(variable)
Radio Label
#radio_label(id, delimiter)
Use this variable to pull back the label of a radio field on your form. For example: #radio_label(123) where '123' is the field ID shown in the layout editor. This variable can only be used in client-side.
Random Number
#random_number(min, max)
Outputs an integer between the specified minimum and maximum attributes. This function does not generate cryptographically secure values, and should not be used for cryptographic purposes.
Random String
#random_string(length, characters)
Outputs a string of random characters. Use the length attribute to control how long the string is and use the characters attribute to control which characters are randomly selected. This function does not generate cryptographically secure values, and should not be used for cryptographic purposes.
Query
#search_query
Seconds in a day
#seconds_day
Returns the number of seconds in a day.
Seconds in a minute
#seconds_minute
Returns the number of seconds in a minute.
Seconds in a week
#seconds_week
Returns the number of seconds in a week.
Seconds in a year
#seconds_year
Returns the number of seconds in a year.
Seconds in an hour
#seconds_hour
Returns the number of seconds in an hour.
Seconds since Epoch
#seconds_epoch
Returns the number of seconds since the Unix Epoch (January 1 1970 00:00:00 GMT).
Section Row Count
#section_row_count(id)
This variable returns the total number of rows in a repeatable section.
Select Option Text
#select_option_text(id, delimiter)
Use this variable to pull back the selected option text of a select field on your form. For example: #select_option_text(123) where '123' is the field ID shown in the layout editor. This variable can only be used in client-side.
Current Date
#server_date
Returns the server date in the format configured in WordPress.
Current Time
#server_time
Returns the server time in the format configured in WordPress.
Custom Date
#server_date_custom(format)
Returns the server date and time in a specified format (PHP date format). For more information about this variable, click here.
Border - Style
#skin_border_style
For more information about this variable, click here.
Border - Style
#skin_border_radius
For more information about this variable, click here.
Border - Width
#skin_border_width
For more information about this variable, click here.
Color - Danger
#skin_color_danger
For more information about this variable, click here.
Color - Default
#skin_color_default
For more information about this variable, click here.
Color - Default (Inverted)
#skin_color_default_inverted
For more information about this variable, click here.
Color - Default (Light)
#skin_color_default_light
For more information about this variable, click here.
Color - Default (Lighter)
#skin_color_default_lighter
For more information about this variable, click here.
Color - Default (Lightest)
#skin_color_default_lightest
For more information about this variable, click here.
Color - Information
#skin_color_information
For more information about this variable, click here.
Color - Primary
#skin_color_primary
For more information about this variable, click here.
Color - Secondary
#skin_color_secondary
For more information about this variable, click here.
Color - Success
#skin_color_success
For more information about this variable, click here.
Color - Warning
#skin_color_warning
For more information about this variable, click here.
Font - Family
#skin_font_family
For more information about this variable, click here.
Font - Size
#skin_font_size
For more information about this variable, click here.
Font - Size (Large)
#skin_font_size_large
For more information about this variable, click here.
Font - Size (Small)
#skin_font_size_small
For more information about this variable, click here.
Font - Weight
#skin_font_weight
For more information about this variable, click here.
Line Height
#skin_line_height
For more information about this variable, click here.
Hash
#submit_hash
ID
#submit_id
Link to submission in WordPress admin
#submit_admin_url
User ID
#submit_user_id
Agent
#tracking_agent
Stores the website visitors agent (browser type).
City (By IP)
#tracking_ip_lookup_city
When enabled, WS Form PRO will perform an IP lookup and obtain the city located closest to their approximate location.
Country (By IP)
#tracking_ip_lookup_country
When enabled, WS Form PRO will perform an IP lookup and obtain the country located closest to their approximate location.
Hostname
#tracking_host
Stores the server hostname.
Location (By IP)
#tracking_ip_lookup_latlon
This will obtain an approximate latitude and longitude of a website visitor by their IP address.
Location (By browser)
#tracking_geo_location
If a website visitors device supports geo location (GPS) this option will prompt and request permission for that data and store the latitude and longitude to a submission.
Operating System
#tracking_os
Stores the website visitors operating system.
Pathname
#tracking_pathname
Pathname of the URL.
Query String
#tracking_query_string
Query string of the URL.
Referrer
#tracking_referrer
Stores the web page address a website visitor was on prior to completing the submitted form.
Region (By IP)
#tracking_ip_lookup_region
When enabled, WS Form PRO will perform an IP lookup and obtain the region located closest to their approximate location.
Remote IP Address
#tracking_remote_ip
Stores the website visitors remote IP address, e.g. 123.45.56.789
UTM Campaign
#tracking_utm_campaign
This can be used to store the UTM (Urchin Tracking Module) campaign parameter.
UTM Content
#tracking_utm_content
This can be used to store the UTM (Urchin Tracking Module) content parameter.
UTM Medium
#tracking_utm_medium
This can be used to store the UTM (Urchin Tracking Module) medium parameter.
UTM Source
#tracking_utm_source
This can be used to store the UTM (Urchin Tracking Module) source parameter.
UTM Term
#tracking_utm_term
This can be used to store the UTM (Urchin Tracking Module) term parameter.
Login
#url_lost_password
Login
#url_login
Logout
#url_logout
Register
#url_register
Admin Color
#user_admin_color
This variable can only be used if a user is currently signed in.
Bio
#user_bio
This variable can only be used if a user is currently signed in.
Display Name
#user_display_name
This variable can only be used if a user is currently signed in.
Email
#user_email
This variable can only be used if a user is currently signed in.
First Name
#user_first_name
This variable can only be used if a user is currently signed in.
ID
#user_id
This variable can only be used if a user is currently signed in.
Last Name
#user_last_name
This variable can only be used if a user is currently signed in.
Login
#user_login
This variable can only be used if a user is currently signed in.
Lost Password Key
#user_lost_password_key
This variable can only be used if a user is currently signed in.
Lost Password URL
#user_lost_password_url(path)
This variable can only be used if a user is currently signed in.
Meta Value
#user_meta(key)
Returns the user meta value for the key specified.
Nice Name
#user_nicename
This variable can only be used if a user is currently signed in.
Nickname
#user_nickname
This variable can only be used if a user is currently signed in.
Registration Date
#user_registered
This variable can only be used if a user is currently signed in.
URL
#user_url
This variable can only be used if a user is currently signed in.
Count
#word_count
The total word count. For more information about this variable, click here. This variable can only be used in the Help setting for text based Fields.
Count Label
#word_count_label
Shows 'word' or 'words' depending on the word count. For more information about this variable, click here. This variable can only be used in the Help setting for text based Fields.
Count Remaining
#word_remaining
If you set a maximum word length for a field, this will show the total remaining word count. For more information about this variable, click here. This variable can only be used in the Help setting for text based Fields.
Count Remaining Label
#word_remaining_label
If you set a maximum word length for a field, this will show the total remaining word count. For more information about this variable, click here. This variable can only be used in the Help setting for text based Fields.
Maximum
#word_max
Shows the maximum word length that you set for a field. For more information about this variable, click here. This variable can only be used in the Help setting for text based Fields.
Maximum Label
#word_max_label
Shows 'word' or 'words' depending on the maximum word length. For more information about this variable, click here. This variable can only be used in the Help setting for text based Fields.
Minimum
#word_min
Shows the minimum word length that you set for a field. For more information about this variable, click here. This variable can only be used in the Help setting for text based Fields.
Minimum Label
#word_min_label
Shows 'word' or 'words' depending on the minimum word length. For more information about this variable, click here. This variable can only be used in the Help setting for text based Fields.
Ticket ID
#zendesk_ticket_id
Returns the ID of the created ticket.
Ticket URL
#zendesk_ticket_url
Returns the URL of the created ticket in your Zendesk account. Do not use this URL in any communications to the person submitting the ticket.