Copy link to clipboard
Copied
I have a very large document with check boxes. There are a total of 63 pages and 565 check boxes. When I convert from Microsoft Word to Adobe PDF, then create a form, I have yet to find a way to tell it that I want these check boxes to default as either "Cross" or "Check" (why is "Square" even an option?). Since I can't have it correct off the bat, I need to go and change every single check box from "Square" to "Check." I have found the most efficient way to do this is per page. That still means I need to go to each page, select all check boxes on that page, and change the Check Box Style properties.
Please tell me I'm doing it wrong and there is a quicker/easier way to do this.
Copy link to clipboard
Copied
You need to run this code from javascript console.
Code:
for (var i=0; i<this.numFields; i++) {
var fieldt = this.getNthFieldName(i);
if(this.getField(fieldt).type == "checkbox"){
this.getField(fieldt).style = xxx ;}}
Change 'xxx' with style you want.
Styles:
check = style.ch
cross = style.cr
diamond = style.di
circle = style.ci
star = style.st
square = style.sq
Copy link to clipboard
Copied
You need to run this code from javascript console.
Code:
for (var i=0; i<this.numFields; i++) {
var fieldt = this.getNthFieldName(i);
if(this.getField(fieldt).type == "checkbox"){
this.getField(fieldt).style = xxx ;}}
Change 'xxx' with style you want.
Styles:
check = style.ch
cross = style.cr
diamond = style.di
circle = style.ci
star = style.st
square = style.sq
Copy link to clipboard
Copied
Thank you!!! I had no idea how to do Java and so this was a first.
I was able to add it into the document, but is there a way to keep it in Adobe so I don't need to do this every time?
Copy link to clipboard
Copied
No, you can't change the default settings used by the Fields Detection Wizard.
Copy link to clipboard
Copied
You can do it by running this code from a button or the JS Console:
for (var i=0; i<this.numFields; i++) {
var f = this.getField(this.getNthFieldName(i));
if (f==null) continue;
if (f.type=="checkbox") f.style = style.ch;
}
Copy link to clipboard
Copied
Thank you so much!
Copy link to clipboard
Copied
Just a tip -
Open javascript console: Ctr + j
Put in your script in the console (bottom), make sure to put in the style you want, ie style.st
Highlight the script
hit Ctr + enter