Troubleshooting Forminator Calculations Showing Zero in Submissions and Emails
Content
One of the most common and frustrating issues reported by users of the Forminator plugin is when a calculation field displays the correct total on the front-end form but then shows a zero (0) in the form submission, email notification, or exported CSV file. This guide will explain why this happens and walk you through the most effective solutions.
Why Does This Happen?
Based on community reports and troubleshooting threads, this problem is frequently linked to the use of repeater/group fields. The issue arises when a final calculation field attempts to reference a calculation that exists inside a group. The data from these nested calculations can sometimes fail to be passed correctly to the backend upon form submission, resulting in a zero value being stored and sent.
How to Identify the Problem
If your form meets the following criteria, you are likely experiencing this specific issue:
- The form contains one or more repeater/group fields.
- Each group has its own internal calculation field (e.g., Quantity * Price).
- A final calculation field outside the group sums the results of these internal group calculations.
- The final total is correct on the form but becomes 0 in submissions and emails.
Common Solutions
Solution 1: Avoid Nested Calculations in Groups
The most reliable way to prevent this issue is to restructure your form's logic to avoid placing calculation fields inside group fields. Instead, only use the group to collect the raw input data (e.g., quantity, product selection). Then, perform all calculations in a single, final calculation field located outside of the group.
Example: Instead of having {group-calc} inside the group and then {total} = {group-calc-1} + {group-calc-2}, create a formula in your final calculation field that directly references the raw number fields within each group, for example: ({quantity-1} * {price-1}) + ({quantity-2} * {price-2}).
Solution 2: Check Your Email and Submission Macros
When configuring your email notifications, ensure you are using the correct merge tag to display the calculation field. Use the specific tag for your final calculation field (e.g., {calculation-1}) rather than a general macro like {all_fields}, which might not handle complex calculations correctly in this scenario.
Solution 3: Review the Formula Syntax
Although not directly related to the group field bug, other calculation errors can cause zeros. A user discovered that when using the modulo operator (%), parentheses are required for the second operand. For example, {number-1}%97 may fail, but {number-1}%(97) works correctly. Always test your formulas thoroughly.
Solution 4: Export and Re-import the Form
In one reported case, a user found that deleted calculation fields were still present in the form's JSON data, causing conflicts. If you have made significant changes to your form's calculations, a known workaround is to export the form to a JSON file, then re-import it. This can clear out stale data and resolve submission errors.
When to Seek Further Help
If the solutions above do not resolve your issue, the problem might be highly specific to your form's setup. The complexity of some calculations, especially those involving conditional logic and multiple fields, can sometimes be beyond the plugin's default capabilities and may require custom code from a developer.
For ongoing discussions and updates on this known issue, you can search for community threads titled "Calculation is zero in the submissions" or "Group calculations submissions and e-mail".
Related Support Threads Support
-
Need Help with Field Group Calculationshttps://wordpress.org/support/topic/need-help-with-field-group-calculations/
-
Calculation doubthttps://wordpress.org/support/topic/calculation-doubt/
-
Calculation: Formularfelder sind leerhttps://wordpress.org/support/topic/calculation-formularfelder-sind-leer/
-
Calculation is zero in the submissions, in the email notification and in CSV.https://wordpress.org/support/topic/calculation-is-zero-in-the-submissions-in-the-email-notification-and-in-csv/
-
Bug found with calculationshttps://wordpress.org/support/topic/bug-found-with-calculations/
-
Override default value of number field based on radio buttonhttps://wordpress.org/support/topic/override-default-value-of-number-field-based-on-radio-button/
-
Calculation field – function ORhttps://wordpress.org/support/topic/calculation-field-function-or/
-
Create minimum pricehttps://wordpress.org/support/topic/create-minimum-price/
-
Add calculation for number and select fieldhttps://wordpress.org/support/topic/add-calculation-for-number-and-select-field/
-
text field calculationhttps://wordpress.org/support/topic/text-field-calculation/
-
Calculate when click on submit buttonhttps://wordpress.org/support/topic/calculate-when-click-on-submit-button/
-
Resent Email Notifications Removing Data (BUG)https://wordpress.org/support/topic/resent-email-notifications-removing-data-bug/
-
Calculate a discount when two checkboxes are checkedhttps://wordpress.org/support/topic/calculate-a-discount-when-two-checkboxes-are-checked/
-
Group calculations submissions and e-mailhttps://wordpress.org/support/topic/group-calculations-submissions-and-e-mail/
-
Calculations, prices and timehttps://wordpress.org/support/topic/calculations-prices-and-time/
-
Populate field with sum of previous submissionshttps://wordpress.org/support/topic/populate-field-with-sum-of-previous-submissions/
-
Do invisible fields count as checked for conditions?https://wordpress.org/support/topic/do-invisible-fields-count-as-checked-for-conditions/
-
Display the value of the calculation in the subject fieldhttps://wordpress.org/support/topic/display-the-value-of-the-calculation-in-the-subject-field/
-
Calculations show as 0s in the databasehttps://wordpress.org/support/topic/calculations-show-as-0s-in-the-database/
-
Reduced price on selected itemshttps://wordpress.org/support/topic/reduced-price-on-selected-items/
-
Hide text in email notifications when a (calculation) field is 0https://wordpress.org/support/topic/hide-text-in-email-notifications-when-a-calculation-field-is-0/
-
Calculations field – percenthttps://wordpress.org/support/topic/calculations-field-percent/
-
Need Guidance on Calculationhttps://wordpress.org/support/topic/need-guidance-on-calculation/
-
Calculating different prices per dayhttps://wordpress.org/support/topic/calculating-different-prices-per-day-2/
-
calculation field is correct in preview, incorrect in front end and submissionshttps://wordpress.org/support/topic/calculation-field-is-correct-in-preview-incorrect-in-front-end-and-submissions/
-
Calculations IF?https://wordpress.org/support/topic/calculations-if/
-
adaptive width of the calculation fieldhttps://wordpress.org/support/topic/adaptive-width-of-the-calculation-field/
-
Field Group Calculating 1st Entry Onlyhttps://wordpress.org/support/topic/field-group-calculating-1st-entry-only/