Due to some bugs, the calculation routine had to be re-written in order to fix them. In previous versions, there was no way whether to choose the calculated value or the input value to be used in calculations.
Additionally, the element option “Overwrite_price” calculates element prices differently. So, if you use element calculations or Subtotal elements in your form, it is recommended you take a look at the forms if all calculations work well with the new version.
Subtotal Overwrite Price Change
In previous versions, if the “Overwrite_price” element option for Subtotal elements were disabled, their own value weren’t considered in calculations. Some form calculations were wrong due to this issue which is fixed now. You can see the difference in the beside image (red rectangle).
Generally, Subtotal elements should always be used for advanced calculations or calculation placeholders (like in the loan calculator example).
Use Calculated Target Value
You can now choose whether to calculate with the target input value or the calculated value. In order to use the calculated values, enable the checkbox after the target dropdown selection in the calculation section. If the checkbox is not checked, the input value will be taken.
The beside images show the difference between input value and calculated target value. The Numbers element’s value is 1. As you can see in the calculation section below the Numbers element, its value will be multiplied by 2, so its input value is 1 and its calculated value is 2.
The first Subtotal element uses the input value (1 * 3 = 3) whereas the second Subtotal element uses the calculated target value (2 * 3 = 6).
Calculation Version
If your forms calculate incorrectly after the update, you can switch the calculation version in the Global Settings -> Other -> Calculation version.
However, this is not recommended since the old calculation version had some minor bugs in terms of calculation. If you have a test site, you can export and import the forms there and change the calculations accordingly.
Changelog
Important change: element calculation has changed due to bugfixes. You can still use the old calculation routine in the global settings -> “Other” section and change the option “Calculation version” to “v2.9.6.1”
- Added: 4 new themes (slick-applegreen, slick-blackwhite, slick-darkblue, slick-mauve)
- Added / fixed: calculation rows may now accept the raw input value or the calculated value
- Added: option to open form automatically on the plugin page
- Added: option to update WooCommerce cart directly after a product was added
- Added: PDF attachment name may now contain placeholders such as {{invoice_id}}, {{id}} etc.
- Added: remote value (fetched by value_http) can now parse JSON data via value_http_json (iterate through JSON objects with dots, e.g.: json_object.key.name )
- Added: conditional “once” operator – do conditional action only once per form
- Changed: default theme changed to “slick”
- Fixed: PDF files were sometimes attached two times
- Fixed: template browser layout
- Fixed: daterange element is now responsive
- Fixed: previewing forms in WP backend caused a JS error
- Fixed: conditional “between” operator fixed
- Fixed: drag’n’drop elements were added when out of bounds
- Fixed: themes now support SSL connections (fixed mixed content loading)
- Fixed: number formatting for non-currency elements (which will use the precision option now)
- Fixed: payment element options couldn’t be removed
- Fixed: timepicker steps
- Fixed: placeholder element now have no margin/padding anymore
- Other: Italian translation added
- Other: updated to dompdf v0.7 which supports cyrillic characters for PDF files