How to give all duplicate checkbox names a unique name?
I found this article that talks about rename all duplicate field names.
for (var i=0;i<200;i++)
{
try{
var ts=this.getField("Name1."+i).textSize;
var tf=this.getField("Name1."+i).textFont;
var rct=this.getField("Name1."+i).rect;
var pg=this.getField("Name1."+i).page;
var f=this.addField("name."+i,"text",pg,rct);
f.textSize=ts;
f.textFont=tf;
}catch(e){break}
}
this.removeField("Name1");
I believed this script is for text box. I need to rename all my duplicate checkbox names. Do I sipmly changed the "text" to "checkbox" for checkbox field instead of text box field? I tried that and it didn't really work. I no longer can click on the checkbox once I ran this script. Any suggestion is much appreciated.
