Skip to main content
Participant
October 11, 2019
Question

Dropdown menu different colros

  • October 11, 2019
  • 1 reply
  • 188 views

Hi,

 

I am trying to create a dropdown menu that has three different options colored with three different colors. The script i'm using works and the yes's are highlighted that color, except when I click anywhere else on the form the color disapears. I cannot seem to figure out how to fix this. I'm assuming there is a script to do that. Does anyone know how I can accomplish this.

 

I have a dropdown here. The customer wants One yes to be green, another to be red and the last to be no color. 

 

I'm using this script:

var f = event.target;
var fv = event.value;

if (fv == "Yes") {
f.fillColor = color.green;
}
else if (fv == "Yes ") {
f.fillColor = color.red;

 

 

So i see it works....yet the color dissapears eventually. 

    This topic has been closed for replies.

    1 reply

    try67
    Community Expert
    Community Expert
    October 12, 2019

    Not possible with a drop-down field. The only way to do something like this is with a custom-made script that emulates such a drop-down using buttons, but that is complex to develop and cumbersome to use.