Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Adobe Acrobat Dropdown menu background colour issues

New Here ,
Apr 27, 2025 Apr 27, 2025

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;

TOPICS
Create PDFs , JavaScript , PDF , PDF forms
395
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
1 ACCEPTED SOLUTION
Community Expert ,
Apr 27, 2025 Apr 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.

View solution in original post

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 27, 2025 Apr 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
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 27, 2025 Apr 27, 2025
LATEST
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines