Expand my Community achievements bar.

SOLVED

conditional formatting

Avatar

Former Community Member

I'm a new user of Acrobat 9 and  was wandering if conditional formatting is possible based on a user  selected value from a drop down list in a form.

I have a drop down list with the following text:

High

Medium

Low

N/A

i  was wondering if its possible for the back ground of the box to be  highlighted red if High is selected, yellow if Medium is selected and  green if Low is selected?

Thanks in advance.

1 Accepted Solution

Avatar

Correct answer by
Level 4

Hello,

You can give the background color of the drop down list according to the value selected

by writing the following script in the exit event:

if(this.rawValue == "High")
    {
        this.fillColor="255,0,0"; //RED
    }   
if(this.rawValue == "Low")
    {
        this.fillColor="0,128,0"; //Green
    }   
if(this.rawValue == "Medium")
    {
        this.fillColor="255,255,0"; //Yellow
    }   

Thanks,

Debadas.

View solution in original post

3 Replies

Avatar

Correct answer by
Level 4

Hello,

You can give the background color of the drop down list according to the value selected

by writing the following script in the exit event:

if(this.rawValue == "High")
    {
        this.fillColor="255,0,0"; //RED
    }   
if(this.rawValue == "Low")
    {
        this.fillColor="0,128,0"; //Green
    }   
if(this.rawValue == "Medium")
    {
        this.fillColor="255,255,0"; //Yellow
    }   

Thanks,

Debadas.

Avatar

Level 1

I have the same requirement and I tried with the solution proposed... but the diferents colors are only displayed when I "click" in the drop down list

I am doing something wrong?

Snap1.jpg

Snap2.jpg