Hi All,
To capitalize the first letter in each word of an input, do the following:
1) Create or modify your custom js file and place the following function in it. (Be sure that the js file has been added in the scripts section of the NetTalk or NetSimple Object extension template under WebServer procedure).
function capitalize(obj) {
var val = obj.value.toLowerCase();
if(!val) return;
val=val.replace(/\b([a-z]+)\b/ig,function(w){
return w.charAt(0).toUpperCase()+w.substring(1);
});
obj.value=val;;
}
2) Create global variable - js:capitalize STRING('capitalize(this);')
3) In the entry field properties, client tab put that variable (no quotes) in the javascript hand-code entry filed (the onchange group). Be sure to check the Field check box under the Hand Code Support option. Also, under the Reset Other fields, add the field you are wanting to Capitalize with the Value checked.
The field will be made Capitalize when the user tabs off it.
Alan