Skip to main content
Participating Frequently
December 19, 2023
Question

Text field color fill from multiple dropdowns

I have an adobe form with 4 dropdown list. All 4 dropdowns have the same information. I am trying to get a text box to change the fill color based on the selection from the dropdown list regaurdless us whic one I use. I have managed to get this to work for the one of them but can't figure out the code for all 4.

Ce sujet a été fermé aux réponses.

1 commentaire

Bernd Alheit
Community Expert
Community Expert
December 19, 2023

What script does you use?

Participating Frequently
December 19, 2023

I used the below in in Custom calculation script.

 

var indicator = this.getField("STP-1").value; {

if (indicator=="Absent")

event.target.fillColor = color.green;

else if (indicator=="Tardy")

event.target.fillColor = color.green;

else if (indicator=="Exited")

event.target.fillColor = color.red;

else if (indicator=="Recycle")

event.target.fillColor = color.yellow;

else

event.target.fillColor = color.transparent;

event.target.fontColor = color.transparent;}

 

try67
Community Expert
Community Expert
December 19, 2023

What if one field has Tardy selected and another Recycled? Which color should be used then?