Copy link to clipboard
Copied
Rusty Java user here. Thanks in advance for the help!
In the form below, I need the user's selection from the drop down menu (Dropdown12) in the Status column (selections are Green, Yellow, Red, N/A) to color that box the corresponding color. I'm running this script as a custom validation script in the Validate tab. I have the "Commit selected value immediately" box checked on the Options tab.
This script turns the dropdown menu background to the correct color (except for black which isn't doing anything), but does not turn the box itself a color. Is what I'm trying to do available in Acrobat?
Thank you!
if (event.value=="Green")event.target.fillColor=color.green;
else if (event.value=="Yellow")event.target.fillColor=color.yellow;
else if (event.value=="Red") event.target.fillColor=red;
else if (event.value=="N/A") event.target.fillColor==black;
------------------
Copy link to clipboard
Copied
Add color.before red and black:
color.red and color.black
And remove one equal sign when setting color black:
event.target.fillColor==black;
Copy link to clipboard
Copied
Thank you for correcting that! I made the change, but the only color change is still the drop down menu background when the selection is made. Their choice in the column remains in black text on the blue background. And, curiously, when the user now clicks on the other cells in the first row, the color of the cell turns from blue to red.
Copy link to clipboard
Copied
You must disable the fields highlighting to see the fill color of the fields.
Copy link to clipboard
Copied
That was helpful, thank you very much! However, the row is now red no matter what color option I select in the Status row.
Copy link to clipboard
Copied
Sorry, in the Status Column, not row.
Copy link to clipboard
Copied
Post the script you used or share the file if you can.
Copy link to clipboard
Copied
Thank you!
if (event.value=="Green")event.target.fillColor=color.green;
else if (event.value=="Yellow")event.target.fillColor=color.yellow;
else if (event.value=="Red") event.target.fillColor=color.red;
else if (event.value=="N/A") event.target.fillColor=color.black;
Copy link to clipboard
Copied
The code is fine. Share the file if it's not working.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Works fine for me.
Copy link to clipboard
Copied
It doesn't work for the other 10 people who have tried it.
Copy link to clipboard
Copied
Where did they try it? In what application?
Copy link to clipboard
Copied
Hi. We're all opening it in Acrobat. The users are selecting an option in the Status column. That dropdown menu turns the selected color and upon exit the field color disappears.
Copy link to clipboard
Copied
Did you disable the fields highlighting, as I've instructed above?
Copy link to clipboard
Copied
If you're talking about Apperance in the Dropdown Properties the fill color is set to nothing. Is there somewhere else this is changed? I also have "Commit Selected Value Immediately" selected on the Options tab in the Drowndown Properties.
Copy link to clipboard
Copied
You can turn it off under Preferences ⇾ Forms ⇾ Show border hover color for fields.
Every user needs to do it on their computer.
Copy link to clipboard
Copied
Holy crow, I had NO idea a global preference like that needed to be adjusted, and for every user! It works! Thank you SO incredibly much. This was driving me bonkers. I appreciate you sharing your expertise and helping me accomplish this task, Nesa. Thank you!
Copy link to clipboard
Copied
You're welcome...
Copy link to clipboard
Copied
I really appreciate your help! Thanks, again!