Script to check all checkboxes at once in a given document
Hi,
I have some 50-60 page document and i want to check all checkboxes using one single script.. How can i do that?
Thank you
Hi,
I have some 50-60 page document and i want to check all checkboxes using one single script.. How can i do that?
Thank you
this is the code that i typed
for (var i=0; i<this.numFields; i++) {
var fname = this.getNthFieldName(i);
var f = this.getField(fname);
if (f==null) continue;
if (f.type=="checkbox") f.checkThisBox(0, true);
var nPgMin = 0, nPgMax = 4;
var oFld = this.getField("xxx");
var aPgs = (typeof(oFld.page) == "number")?[oFld.page]:oFld.page;
var bOnPage = aPgs.some(a=> a>=nPgMin && a<=nPgMax);
}this doesn't seem to work.please help
If they are all individual fields then it's quite easy to do, actually. You don't need to sort them or anything like that. Just change this line:
if (f.type=="checkbox") f.checkThisBox(0, true);
To this:
if (f.type=="checkbox" && f.page<=4) f.checkThisBox(0, true);
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.