Hi @mlchrt
Thanks for response!
Please try this code instead of all the fixes that you’ve tried so far:
<?php
add_filter( 'forminator_prepared_data', 'wpmudev_fix_calculation_notifications', 10, 2 );
function wpmudev_fix_calculation_notifications( $prepared_data, $module_object ) {
if ( $prepared_data['form_id'] != 3474 ) {
return $prepared_data;
}
$custom_form = Forminator_Form_Model::model()->load( $prepared_data['form_id'] );
foreach ( $prepared_data as $key => $value ) {
if ( false !== strpos( $key, 'calculation' ) ) {
$calc_field = $custom_form->get_field( $key, true );
$prepared_data[$key] = Forminator_Field::forminator_number_formatting( $calc_field, $prepared_data[ $key ] );
}
}
return $prepared_data;
}
To add it to the site:
– create an empty file with a .php extension (e.g. “formiantor-round-zero-fix.php”)
– copy and paste above code into it
– in this line
if ( $prepared_data['form_id'] != 3474 ) {
replace number 3474 with an ID of your form (same number as you can see in form’s shortcode)
– save the file and upload it (using FTP, cPanel’s “File Manager” or similar way) to the “/wp-content/mu-plugins” folder of your site’s WordPress install
Once it’s there, test the form to see if it solves the issue.
Best regards,
Adam