Skip to main content
Participant
Jul 14, 2021 10:55 AM UTC
Answered

How to change the checkbox style of all checkboxes at once in a pdf

Hi there,

 

I converted a word document with checkboxes to pdf but the checkbox style it created them in is "Square". Is there any way to change all of these at once to the "Check" style without having to change them all painfully one by one?

 

Thanks for your help.

Nesa Nurani
Nesa NuraniCorrect answer
Community Expert
Jul 14, 2021 11:30 AM UTC

Run this from javascript console or put it in a button as mouse Up event:

for (var i=0; i<this.numFields; i++){
var cBox = this.getNthFieldName(i);
if(this.getField(cBox).type == "checkbox"){
this.getField(cBox).style = style.ch;}}

5 replies

Nesa Nurani
Community Expert
Nesa NuraniCommunity ExpertCorrect answer
Community Expert
Jul 14, 2021 11:30 AM UTC

Run this from javascript console or put it in a button as mouse Up event:

for (var i=0; i<this.numFields; i++){
var cBox = this.getNthFieldName(i);
if(this.getField(cBox).type == "checkbox"){
this.getField(cBox).style = style.ch;}}

Translate
Liam1587Author
Participant
Jul 14, 2021 3:56 PM UTC

That worked, thanks for that!

Translate