Thank you Predrag so much, it work like a charm.
in my case. insert jQuery instead of install plugin.
* Note, to make this work:
* 1. Enable load form using Ajax on Behaviour tab
* 2. Add class name wpmudev-calculation into calculation field (Calculation field settings -> Styling tab)
*/
jQuery( document ).ready(function($) {
function formatNumber(nStr, decSeperate, groupSeperate) {
nStr += "";
x = nStr.split(decSeperate);
x1 = x[0];
x2 = x.length > 1 ? "." + x[1] : "";
for (var rgx = /(\d+)(\d{3})/; rgx.test(x1); )
x1 = x1.replace(rgx, "$1" + groupSeperate + "$2");
return x1 + x2
}
$(document).on('after.load.forminator', function(e, _form_id){
$('#forminator-module-'+ _form_id).find('.wpmudev-calculation .forminator-calculation').on('change', function(){
let _this = $(this),
_next = _this.next(".forminator-input");
if( ! _next.length ){
_this.after('<input type="text" class="forminator-input" value="'+ formatNumber( _this.val(), '.', ',') +'" disabled="true" />');
_this.hide();
}else{
_next.val( formatNumber( _this.val(), '.', ',') );
}
});
});
});