Skip to main content
Participant
April 27, 2025
Answered

Adobe Acrobat Dropdown menu background colour issues

Hi guys,
I'm pretty new to Javascript. I just wanted to write a basic code so that when certain options are selected, the background will change colour. The issue that I'm having however is that when I select the option (eg. Critical), it will change colour (eg. red), but when I click off to select anywhere else in the page, it changes back to the default blue. I've selected "Commit selected value immediately" and my code is below. Help please!

 

 

if (event.value=="Critical")

event.target.fillColor = color.red;

 

else if (event.value=="High")

event.target.fillColor = ["RGB",1,0.5,0];

 

else if (event.value=="Medium")

event.target.fillColor = color.yellow;

 

else if (event.value=="Low")

event.target.fillColor = color.green;

 

else

event.target.fillColor = color.transparent;

Nesa Nurani
Nesa NuraniCorrect answer
Community Expert
April 27, 2025

Blue color is field highlight, you have to turn it off in preferences, go to preferences (CTRL+K) select 'Forms' and uncheck checkbox 'Show border hover color for fields'.

This will only work on your computer if you share a file, others will have to do the same.

2 replies

Nesa Nurani
Community Expert
Nesa NuraniCommunity ExpertCorrect answer
Community Expert
April 27, 2025

Blue color is field highlight, you have to turn it off in preferences, go to preferences (CTRL+K) select 'Forms' and uncheck checkbox 'Show border hover color for fields'.

This will only work on your computer if you share a file, others will have to do the same.

Translate