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

Change font colors for choices in drop down list on Adobe PDF using Adobe Acrobat Pro.

New Here ,
Oct 09, 2023 Oct 09, 2023

Copy link to clipboard

Copied

I created a dropdown choice box in a PDF for with the following choices:

VERY LOW

LOW

MINOR

MODERATE

SERIOUS

HIGH

 

I would like the font color to change depending on the choice (Green, Green, Blue, Yellow, Orange, Red) from choices above.  Can someone provide the script I can use to do this. Thanks in advance.

TOPICS
Create PDFs , How to , Modern Acrobat , PDF , PDF forms

Views

340

Translate

Translate

Report

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

correct answers 1 Correct answer

Community Expert , Oct 09, 2023 Oct 09, 2023

You can use this as 'Validate' script of dropdown field:

if(event.value == "VERY LOW" || event.value == "LOW")
event.target.textColor = color.green;

else if(event.value == "MINOR")
event.target.textColor = color.blue;

else if(event.value == "MODERATE")
event.target.textColor = color.yellow;

else if(event.value == "SERIOUS")
event.target.textColor = ["RGB", 255/255, 136/255, 0/255] ;//orange

else if(event.value == "HIGH")
event.target.textColor = color.red;

When you make a choice it will chan

...

Votes

Translate

Translate
Community Expert ,
Oct 09, 2023 Oct 09, 2023

Copy link to clipboard

Copied

You can use this as 'Validate' script of dropdown field:

if(event.value == "VERY LOW" || event.value == "LOW")
event.target.textColor = color.green;

else if(event.value == "MINOR")
event.target.textColor = color.blue;

else if(event.value == "MODERATE")
event.target.textColor = color.yellow;

else if(event.value == "SERIOUS")
event.target.textColor = ["RGB", 255/255, 136/255, 0/255] ;//orange

else if(event.value == "HIGH")
event.target.textColor = color.red;

When you make a choice it will change to a specific color but if you go and make another choice, while you are choosing all choices will have that same color if it's fine with you leave as it is, but if you wish for them to have black color while selecting use this as 'Mouse Down' action of same dropdown field:

event.target.textColor = color.black;

Votes

Translate

Translate

Report

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
New Here ,
Oct 10, 2023 Oct 10, 2023

Copy link to clipboard

Copied

LATEST

Thank you so much.  Works perfectly!

Votes

Translate

Translate

Report

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