The cart total field allows you to show the overall cart total amount. This is the sum of all cart detail fields.
The cart total field is read-only and cannot be changed by the web user.
To learn how to add, edit, clone, move, resize, offset, or delete a price subtotal field, please click here.
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.
The basic tab contains settings that the majority of WS Form users will need to control a field. The settings are as follows:
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’.
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.
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.
Allow Negative Value
If negative amounts are permitted in this field, check this box.
Prefix / Suffix
The prefix and suffix settings allow you to add a prefix box and/or suffix box to the field.
For example, you could add a unit of measure as a suffix, or an @ symbol as a prefix.
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.
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 add-ons may add exclusions in this section too, such as the WooCommerce add-on which allows you to exclude certain fields from the cart entries.
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.
The advanced tab contains additional form attribute settings that provide further control over how a field is rendered.
Use the ‘Styles’ settings to change the design of the cart total field.
There are five positions you can choose from for your label:
The default position will place the label set in the form settings advanced tab. For new forms this will be the ‘Top’ positioning.
Note that when using some frameworks some label positions may not be available.
If your label position is set to left or right, you can specify how wide the label will be. You can consider the overall width of the label and the field to be 12 columns (or whatever value is set in Form Settings). By default, labels are rendered at 3 columns wide (1/4 width), which means the field itself is 9 columns wide (3/4 width). You can change the width of the label using this setting.
To change the default width of all labels in your form:
1. Click the form settings icon.
2. Click the ‘Advanced’ tab.
3. Scroll down to ‘Default Label Width’ and change the setting.
4. Click ‘Save’ at the bottom.
The vertical alignment option allows you to choose how this field will be vertically aligned in relation to fields in the same row. The options are:
For developers WS Form allows you to add your own classes to fields.
The wrapper CSS class setting enables you to add a class (or classes) to a field wrapper. Field wrappers are sections of HTML added around a field to position them on the page. To add multiple classes, add a space between the class names.
To add a class to the actual field element itself, enter a class (or classes) to this setting. To add multiple classes, add a space between the class names.
Choose from one of the options to filter which user status can see this field:
- Is Logged In
- Is Logged Out
- Has User Role or Capability
If you choose ‘Has User Role or Capability’, additional settings will appear that enable you to choose one or more roles or capabilities.
This setting is used to add custom attributes to the HTML of this field, such as
data-my-attribute="1234". You can add as many custom attributes as you need.
To add a custom attributes key value pair:
- Click the ‘Add’ icon to add a custom attribute row.
- Enter the key in the left column.
- Enter the value in the right column.
- Click ‘Save’ to save the custom attributes.
The breakpoint settings define the width of a field and also what the offset (how many columns from the left-hand side of the form or the previous field) of a field is for each breakpoint. For more information about the breakpoint settings and capabilities of WS Form, click here.