Text Formatting
this two pronged question shown below.
1) how can format text field (such postal code) automaticall formatted uppercase.
2) how can format firstname lastname first letters capitalized. same goes organisation name such bank of toronto.
thanks suggestions.
1) postal code
// form1.page1.subform1.postalcode::exit - (javascript, client)
var postalcode = this.rawvalue;
this.rawvalue = postalcode.touppercase();
2) capitalize first letters
// form1.page1.subform1.bankname::exit - (javascript, client)
var str = this.rawvalue;
var arrayofstrs = str.split(" ");
var newarrayofstrs = new array();
for (var i=0; < arrayofstrs.length; i++) {
var str = arrayofstrs[i];
var strlen = str.length;
var firstletter = str.substring(0,1);
var therest = str.substring(1,strlen);
newarrayofstrs[i] = firstletter.touppercase() + therest;
}
this.rawvalue = newarrayofstrs.join(" ");
steve
More discussions in LiveCycle Forms
adobe
Comments
Post a Comment