I have a Client Script that uses onChange event to replace commas (,) with dots.
It successfully replaces commas when entered into the field, but it removes dots. For example, 1.1 becomes 11.
Does anyone know why this is happening?
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
var fte = g_form.getValue('fte');
if(fte.indexOf(',') > -1){
var newStr = fte.replace(',','.');
g_form.setValue('fte', newStr);
}
}