I am making a whole bunch of check boxes, and I have made a lot on another pdf I had made, but the names are similar. Essentially the names all like "xx-Something"...I would like to search through all my field names in the new pdf that have "xx" and remove that part of the fieldname. I am a bit new to acrobat and javascripting..I have a script, but my error is that getField("").name is read-only. Here is my script so you can see how I was thinking:
//this would go in a mouse-up action in a button
var fieldname = "";
for(var i = 0; i < this.numFields; i++) {
fieldname=this.getNthFieldName(i);
if(fieldname.substring(0, 2) == "U1") {
//remove "U1" from name
getField(fieldname).name = fieldname.substring(2,99);
}
}
Any advice help would be great
//this would go in a mouse-up action in a button
var fieldname = "";
for(var i = 0; i < this.numFields; i++) {
fieldname=this.getNthFieldName(i);
if(fieldname.substring(0, 2) == "U1") {
//remove "U1" from name
getField(fieldname).name = fieldname.substring(2,99);
}
}
Any advice help would be great