You are viewing limited content. For full access, please sign in.

Question

Question

dropdown color

asked on September 30, 2019

hello,

I have a table & in that have a dropdown field

I have 3 options & want the color as per:

Closed: Green

In Progress: Red

Pending: Orange

 

What I want is, that the text in dropdown should have the color, so Closed should be Green, In Progress should be Red & Pending should be Orange.

Also, the idea is that this text has to be used in Update Word document activity, so the color should be reflected in word.

Can anyone help, Please?

Regards,

Sahil

0 0

Replies

replied on September 30, 2019 Show version history

You can do this with JavaScript

const dropdown = $('#Fieldwhichever');

dropdown[0][1].style = "background-color: green";
dropdown[0][2].style = "background-color: red";
dropdown[0][3].style = "background-color: orange";

This one assumes that your first option is blank and you don't want to recolor it. Remember that arrays start at 0, so if you don't have a blank and you are having trouble targeting the first option then you'll need to target dropdown[0][0]

You can see some more ideas here: https://stackoverflow.com/questions/12836227/change-select-box-option-background-color

1 0
replied on April 27, 2021

Is there a way for the color to stay on the background once it is selected?

 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.