Copy link to clipboard
Copied
Hello!
I created a PDF for a client that has javascript in it to assign a higlight color to a check box when that option is chosen in the dropdown. (Kudos to this community for helping me figure out how to do that.) It's working as intended on my PC but when my client uses it on his mac, the dropdowns do odd things.
This is what he tells me.
When I click "Blue" the checkbox area turns Blue. When I click "Orange" the checkbox turns Blue, unless I click it to check it off, then it turns orange. And if I click it again to uncheck it, it stays orange. Then when I set the next one "green" both turn blue. If I click on the green one to check and uncheck, it turns green, and then if I check/un-check the orange one, THAT one turns orange, and the green one turns back to blue. And when I do the next one, they ALL turn back to blue (unless set to "none").
He is not referring to the form field higlighting.
Is there a conflict between PC and Mac? Did I miss something in the code?
I have attached the PDF as well as screenshots he provided.
Here is the code behind one of the dropdowns.
if(event.value == "Blue"){
this.getField("Top Three Check Box.0").fillColor = ["RGB", 0.8, 0.89, 1];}
else if(event.value == "Yellow"){
this.getField("Top Three Check Box.0").fillColor = ["RGB", 1, 1, 0.8];}
else if(event.value == "None"){
this.getField("Top Three Check Box.0").fillColor = color.transparent;}
else if(event.value == "Green"){
this.getField("Top Three Check Box.0").fillColor = ["RGB", 0.8, 1, 0.8];}
else if(event.value == "Orange"){
this.getField("Top Three Check Box.0").fillColor = ["RGB", 1, 0.8, 0.6];}
else if(event.value == "Purple"){
this.getField("Top Three Check Box.0").fillColor = ["RGB", 0.89, 0.8, 1];}
else if(event.value == "Pink"){
this.getField("Top Three Check Box.0").fillColor = ["RGB", 1, 0.8, 0.89];}
I know you said it's not field highlight color but in photos you provided, it looks to me that field highlight color overlay checkbox color unless he click on checkbox like he did on second photo.
Tell him to try turn of "Show border hover color for field" under preferences->forms and test it.
Copy link to clipboard
Copied
Did he tick "Commit selected value immediately" in dropdown field properties under options tab?
Copy link to clipboard
Copied
Yes, that checkbox is ticked on all of the dropdown fields.
Copy link to clipboard
Copied
What application does he use?
JavaScript may not work properly on different application.
Copy link to clipboard
Copied
He is using Acrobat Pro DC on MacOS
Copy link to clipboard
Copied
Is he working with forms in Preview?
Forms opened and then saved in preview on mac can have javascript completely removed or corrupted.
Copy link to clipboard
Copied
He tried it originally and I told him that Preview disables Javascript. I told him to use Acrobat DC. He is using Acrobat Pro DC on MacOS in the examples shown.
Copy link to clipboard
Copied
I know you said it's not field highlight color but in photos you provided, it looks to me that field highlight color overlay checkbox color unless he click on checkbox like he did on second photo.
Tell him to try turn of "Show border hover color for field" under preferences->forms and test it.
Copy link to clipboard
Copied
That appears to have been the problem.