How to change field name order within list?
hi all,
i using javascript taken forums need beautifully (thanks gilad d) 1 small wrinkle. script pulls fields name of fields marked required have been left blank. have named fields correspond question number user have reference. order sorted numerically means "#1" followed "#10"....
1 - list authorizing facility
10 - date of submittal
2 - name of designee
3 - date of examination
etc
is possible change order? script i'm using:
var emptyfields = [];
for (var i=0; i<this.numfields; i++) {
var f= this.getfield(this.getnthfieldname(i));
if (f.type!="button" && f.required ) {
if ((f.type=="text" && f.value=="") || (f.type=="checkbox" && f.value=="off") || (f.type=="combobox" && f.value==" ")) emptyfields.push(f.name);
}
}
if (emptyfields.length>0) {
app.alert("please check following fields completed (if applicable) before continuing:\n" + emptyfields.join("\n"));
}
thanks!
you can write own sort function , use sort list. see here fore more info:
More discussions in JavaScript
adobe
Comments
Post a Comment