Cart Detail Field

The Cart Detail field is used to show cart-level amounts, such as the cart subtotal, shipping, and discount fields. These fields are optional.

Their location on a typical cart can be found below:

The following types of cart detail fields are available:

The cart total is calculated from the sum of all the cart detail fields. You are not required to put any cart detail fields on the form in order for the cart to calculate correctly.

Put the amount you want to charge for that detail in the Default Value setting of the field. WS Form variables can be use too.

For example, to charge 10% tax you could configure a Price Detail field as type Tax and then enter the following in the Default Value setting:

#calc(#ecommerce_cart_subtotal * 0.1)

Adding a Cart Detail Field

To learn how to add, edit, clone, move, resize, offset, or delete a price subtotal field, please click here.

Field Settings

To edit the settings for this field type, click the settings icon on the field itself. Click the Save & Close or Save button to save your changes. If you do not want to save your changes, you can click the Cancel button or click any other form element to close the field settings sidebar. WS Form - Field Settings Icon

Basic

The basic tab contains settings that the majority of WS Form users will need to control a field. The settings are as follows:

Label

This is the label shown alongside the field. As well as entering a label into this field, you can also double click the label of the field in the editor. You should enter an easy-to-understand label for your field, for example, Price Subtotal.

Show Label

If enabled the label will be shown on your form. If you do not want the label to appear for a particular field, uncheck this box.

Hidden

If checked the field will be hidden on the form. It can be shown again using conditional logic or your own JavaScript.

Text Align

This setting determines how the price will be aligned in the field. This defaults to Right for ease of reading, but you can change it to different justifications.

Type

Select which type of cart detail field this is. Choose from:

  • Subtotal (the total amount of all price subtotal fields)
  • Shipping
  • Tax
  • Handling Fee
  • Discount
  • Shipping Discount
  • Insurance
  • Gift Wrap
  • Other

Default Value

The default value setting is used to populate the field with some default content. Unlike the placeholder text, default values are stored when the form is saved or submitted.

WS Form variables can be entered into this field.

Allow Negative Value

If negative amounts are permitted in this field, check this box.

Placeholder

Field placeholders are used to place text in a field prior to the website visitor completing the field. The web browser then removes the placeholder text when text is entered into the field. Placeholder text is typically used to provide an example of what should be entered into that field, such as $1.00 for a currency field. If this field is left blank, a placeholder will not be added to the field.

Placeholder text is not stored when the form is saved or submitted.

WS Form variables can be entered into this field.

Help Text

The help text setting enables you to add smaller text under the field to assist the website visitor in completing that field.

As well as inserting plain text into this field, WS Form also provides extensive functionality for adding character and word count information. Click here to learn more about this functionality.

WS Form variables can be entered into this field.

Auto Complete

Web browsers sometimes have features for helping users fill forms in, for example pre-filling the user’s address based on earlier user input. The autocomplete content attribute can be used to hint to the web browser how to, or indeed whether to, provide such a feature.

Use this setting if you would like to specify the value of the autocomplete attribute. Use the off option to prevent auto complete on the field.

Prefix / Suffix

The prefix and suffix settings allow you to add a prefix box and/or suffix box to the field.

WS Form - Prefix / Suffix

For example, you could add a unit of measure as a suffix, or an @ symbol as a prefix.

Accessibility

ARIA Label

Accessible Rich Internet Applications (ARIA) defines ways to make web content and web applications more accessible to people with disabilities.

This setting enables you to define what text is made available to ARIA applications. This would, for example, provide a screen reader with specific text to read to someone with a disability.

The value of this setting defaults to your field label. If you would like to change this, enter a new value.

WS Form variables can be entered into this field.

Exclusions

Exclude From Emails

By default, WS Form uses the #email_submission variable in email templates. This provides a simple way of displaying all of the submitted fields in emails. Sometimes there might be a need to exclude a field from an email, for example, you might want to not include some introductory copy on a form, or hide a field you’re using with conditional logic to show or hide an element.

To hide a field from emails, check this box.

Other WS Form integrations may add exclusions in this section too, such as the WooCommerce integration which allows you to exclude certain fields from the cart entries.

Hidden Behavior

These settings allow you to change the behavior of a field if the hidden setting is checked (See above), or if you set a field as hidden using conditional logic.

Always Include in Actions

The normal behavior for a field that has been hidden is that it will not be included if an action has a Clear Hidden Fields setting enabled. For example, if you have a Send Email action, WS Form will not include fields that are hidden.

If this setting is checked, this field will always be included in actions if it is hidden.

Always Include in Cart Total

The normal behavior for an e-commerce field that has been hidden is that it will not be included in the Cart Total calculation.

If this setting is checked, this field will always be included in the Cart Total calculation if it is hidden.