Changing the background colour of a tabe cell, according to the selection in a drop down list

Avatar

Avatar

Staffle

Avatar

Staffle

Staffle

05-10-2015

I have a drop-down list wrapped in a subform in a table cell. Users can pick Green, yellow or red and I want the background colour to change according to their selection.

Can you tell me why this script is not working? I am sure some of you folks can see it in a second.


if (this.ListItem=="green") {

Subform1.DropDownList1.fillColor = "000,128,000"; BackgroundFill="solid";

}                  

if (this. ListItem=="yellow") {

Subform1.DropDownList1.fillColor = "255,128,000";

}

if (this.ListItem=="red") {           

Subform1.DropDownList1.fillColor = "255,000,000";     

}


Thanks

View Entire Topic

Avatar

Avatar

Staffle

Avatar

Staffle

Staffle

09-10-2015

Hi,

Thank you for your suggestion. Unfortunately, the scripts are not working as hoped.

I put the form "Project Status Report_2" in the shared Google folder here: PDF forms.The drop-down list in question is in section "3. Deliverable Status".

I added your scripts on enter* and change* to the first row, second column.

Rows 2-4 have the script that changes the colour but on exit, every cell defaults back to green. Do you know how I can fix that?

Thanks again!

Lisa