WS Form variables enable you to add dynamic content to various elements of your form such as default field values and email templates.
Looking for some of our most commonly used variables? Check out our Variable Cheat Sheet!
Areas where WS Form variables can be used are accompanied by a field lookup icon. By clicking this icon, a list of the available variables will be shown below the corresponding field. Clicking 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("d m, Y")
WS Form Variable List
The following variables are available for use in WS Form.
- Author
- Blog
- Calculation
- Character
- Checkbox
- Client
- Conditional
- Cookies
- Data Grid Rows
- Date
- E-Commerce
- Field
- Form
- Freshdesk
- HTTP
- Hash
- InstaWP
- Local Storage
- Math
- Number
- OpenAI
- Option
- Post
- Progress
- Radio
- Random Numbers
- Random Strings
- Search
- Seconds
- Section
- Section Rows
- Select
- Server
- Session Storage
- Skin
- String
- Stripe Elements
- Submission
- Tab
- Text
- Tracking
- URL
- User
- Word
- Zendesk
Blog
| Variable | Name | Description | Usage |
|---|---|---|---|
#blog_admin_email | Admin Email | Returns the Administrator Email Address setting in WordPress Settings > General. | Actions |
#blog_charset | Character Set | Returns the site character set. | Client-side & Actions |
#blog_date | Current Date | Returns the blog time formatted according to the Time Format setting found in WordPress Settings > General. For more information about this variable, click here. | Actions |
#blog_date_custom("format", seconds_offset) | Custom Date | Returns the blog date and time in the specified format (PHP date format). For more information about this variable, click here. | Actions |
#blog_language | Language | Returns the Language setting in WordPress Settings > General. | Client-side & Actions |
#blog_name | Name | Returns the Site Title setting in WordPress Settings > General. | Client-side & Actions |
#blog_time | Current Time | Returns the blog time formatted according to the Date Format setting found in WordPress Settings > General. For more information about this variable, click here. | Actions |
#blog_url | URL | Returns the WordPress Address (URL) setting in WordPress Settings > General. | Client-side & Actions |
Calculation
| Variable | Name | Description | Usage |
|---|---|---|---|
#calc(calculation) | Calculation | Returns the calculated value. For more information about this variable, click here. | Client-side |
Character
| Variable | Name | Description | Usage |
|---|---|---|---|
#character_count | Count | Returns the total character count. For more information about this variable, click here. | |
#character_count_label | Count Label | Returns 'character' or 'characters' depending on the character count. For more information about this variable, click here. | |
#character_max | Maximum | Returns the maximum character length that you set for a field. For more information about this variable, click here. | |
#character_max_label | Maximum Label | Returns 'character' or 'characters' depending on the maximum character length. For more information about this variable, click here. | |
#character_min | Minimum | Returns the minimum character length that you set for a field. For more information about this variable, click here. | |
#character_min_label | Minimum Label | Returns 'character' or 'characters' depending on the minimum character length. For more information about this variable, click here. | |
#character_remaining | Count Remaining | If you set a maximum character length for a field, this will return the total remaining character count. For more information about this variable, click here. | |
#character_remaining_label | Count Remaining Label | If you set a maximum character length for a field, this will return the total remaining character count. For more information about this variable, click here. |
Checkbox
| Variable | Name | Description | Usage |
|---|---|---|---|
#checkbox_count(field_id, include_hidden) | Checkbox Checked Count | Use this variable to return the number of checkboxes that have been checked in a checkbox field. For example: #checkbox_count(123) where '123' is the field ID shown in the layout editor. Use #text(#checkbox_count(123)) to keep the value dynamically updated. For more information about this variable, click here. | Client-side |
#checkbox_count_total(field_id, include_hidden) | Checkbox Rows Count | Use this variable to return the total number of checkboxes in a checkbox field. For example: #checkbox_count_total(123) where '123' is the field ID shown in the layout editor. Use #text(#checkbox_count_total(123)) to keep the value dynamically updated. Set include_hidden attribute to true to include hidden checkboxes. For more information about this variable, click here. | Client-side |
#checkbox_label(field_id, "delimiter") | Checkbox Label | Use this variable to insert 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. For more information about this variable, click here. | Client-side |
Client
| Variable | Name | Description | Usage |
|---|---|---|---|
#client_date | Current Date | Returns the users web browser local date according to the Date Format setting found in WordPress Settings > General. For more information about this variable, click here. | Client-side |
#client_date_custom("format", seconds_offset) | Custom Date | Returns the users web browser local date and time in the specified format (PHP date format). For more information about this variable, click here. | Client-side |
#client_time | Current Time | Returns the users web browser local time according to the Time Format setting found in WordPress Settings > General. For more information about this variable, click here. | Client-side |
Conditional
| Variable | Name | Description | Usage |
|---|---|---|---|
#endif | End of IF condition. | End of IF condition. For more information about this variable, click here. | Client-side & Actions |
#if("condition") | Start of IF condition. | Start of IF condition. For more information about this variable, click here. | Client-side & Actions |
Data Grid Rows
| Variable | Name | Description | Usage |
|---|---|---|---|
#data_grid_row_action_variable | Action Variable Column | Use this variable within a data grid row to insert the text found in the action variable column. For more information about this variable, click here. | |
#data_grid_row_label | Label Column | Use this variable within a data grid row to insert the text found in the label column. For more information about this variable, click here. | |
#data_grid_row_price | Price Column | Use this variable within a data grid row to insert the text found in the price column. For more information about this variable, click here. | |
#data_grid_row_price_currency | Price Column (With Currency) | Use this variable within a data grid row to insert the text found in the price column formatted using the currency settings. For more information about this variable, click here. | |
#data_grid_row_value | Value Column | Use this variable within a data grid row to insert the text found in the value column. For more information about this variable, click here. | |
#data_grid_row_woocommerce_cart | WooCommerce Cart Column | Use this variable within a data grid row to insert the text found in the WooCommerce cart column. For more information about this variable, click here. |
Date
| Variable | Name | Description | Usage |
|---|---|---|---|
#date_format("date", "format") | Format a date string | Return a date formatted according to the PHP date function. The date supplied must be in a supported format such as ISO 8601, for example: 2025-12-30T21:03:14+00:00. For field related date formatting, see: #field_date_format | Client-side & Actions |
E-Commerce
| Variable | Name | Description | Usage |
|---|---|---|---|
#ecommerce_cart_discount | Discount | Excludes currency symbol. For more information about this variable, click here. | Client-side & Actions |
#ecommerce_cart_discount_currency | Discount (Currency) | Includes currency symbol. For more information about this variable, click here. | Client-side & Actions |
#ecommerce_cart_discount_span | Discount (Span) | Excludes currency symbol. For more information about this variable, click here. | Client-side |
#ecommerce_cart_discount_span_currency | Discount (Span Currency) | Includes currency symbol. For more information about this variable, click here. | Client-side |
#ecommerce_cart_gift_wrap | Gift Wrap | Excludes currency symbol. For more information about this variable, click here. | Client-side & Actions |
#ecommerce_cart_gift_wrap_currency | Gift Wrap (Currency) | Includes currency symbol. For more information about this variable, click here. | Client-side & Actions |
#ecommerce_cart_gift_wrap_span | Gift Wrap (Span) | Excludes currency symbol. For more information about this variable, click here. | Client-side |
#ecommerce_cart_gift_wrap_span_currency | Gift Wrap (Span Currency) | Includes currency symbol. For more information about this variable, click here. | Client-side |
#ecommerce_cart_handling_fee | Handling Fee | Excludes currency symbol. For more information about this variable, click here. | Client-side & Actions |
#ecommerce_cart_handling_fee_currency | Handling Fee (Currency) | Includes currency symbol. For more information about this variable, click here. | Client-side & Actions |
#ecommerce_cart_handling_fee_span | Handling Fee (Span) | Excludes currency symbol. For more information about this variable, click here. | Client-side |
#ecommerce_cart_handling_fee_span_currency | Handling Fee (Span Currency) | Includes currency symbol. For more information about this variable, click here. | Client-side |
#ecommerce_cart_insurance | Insurance | Excludes currency symbol. For more information about this variable, click here. | Client-side & Actions |
#ecommerce_cart_insurance_currency | Insurance (Currency) | Includes currency symbol. For more information about this variable, click here. | Client-side & Actions |
#ecommerce_cart_insurance_span | Insurance (Span) | Excludes currency symbol. For more information about this variable, |