The form is developed in Live Cycle 9
There is the following code:
var str = rawValue;
var FIO = str.split (' ');
var a = FIO.length
switch (a) {
case 2:{
FIO [0] = FIO [0].charAt (0).toUpperCase () + FIO [0].substr (1);
FIO [1] = FIO [1].charAt (0).toUpperCase () + FIO [1].substr (1);
rawValue = FIO.join (' ');
break;
}
case 3:{
FIO [0] = FIO [0].charAt (0).toUpperCase () + FIO [0].substr (1);
FIO [1] = FIO [1].charAt (0).toUpperCase () + FIO [1].substr (1);
FIO [2] = FIO [2].charAt (0).toUpperCase () + FIO [2].substr (1);
rawValue = FIO.join (' ');
break;
}
case 4:{
FIO [0] = FIO [0].charAt (0).toUpperCase () + FIO [0].substr (1);
FIO [1] = FIO [1].charAt (0).toUpperCase () + FIO [1].substr (1);
FIO [2] = FIO [2].charAt (0).toUpperCase () + FIO [2].substr (1);
FIO [3] = FIO [3].charAt (0) + FIO [3].substr (1);
rawValue = FIO.join (' ');
break;
}
default:
rawValue = str;
}
}
This code works on "exit" event (transfers the first symbols of the first three words to the top register, input of all text happens in the bottom register). How to make the given functionality on "change" event. It is necessary that at once at text input in the field the first symbols of the first those words were removed in the top register.