Copy link to clipboard
Copied
Hi, everyone. I've tried this code both in "Custom Format Script" and "Custom Validation Script" but it shows the desired background color as long as the cursor is inside the text field. When I click anywhere, the background goes away. The code I'm using from this forum is
var v = Number(event.value);
if (v>=0 && v<=26) {event.target.fillColor = color.green;}
else if (v>26 && v<=50) {event.target.fillColor = color.yellow;}
else if (v>50 && v<=60) {event.target.fillColor = color.red;}
else event.target.fillColor = color.white;
I have tried many other codes from the forum having different techniques of performing the same function, but other codes do not even show the color.
I'm using Adobe Acrobat Pro DC Version 2020.012.20048.
Can you please help me to get this worked?
Regards
In the preferences of Adobe Acrobat disable the form highlighting.
Copy link to clipboard
Copied
Code is fine if , it must be something else going on in your file.Try sharing your file here.
Copy link to clipboard
Copied
In the preferences of Adobe Acrobat disable the form highlighting.
Copy link to clipboard
Copied
Thank you. It solved my problem. I was wondering why my own codes as well as codes from the forum are not working. Thanks again.