Changing colour of text in drop down menu

Hello,

I have a custom drop down menu called (Status) in Sales Quotes containing the following words:

REJECTED
PENDING
ACCEPTED
COMPLETED

I would like the change the color of each word, but i don’t know anything about coding.

Is this possible?

Cheers
Colin.

1 Like

This won’t work. Here is the main issue:

Custom fields will accept HTML code. So you can use tags to define how text is presented in them. For example, <b>REJECTED</b> produces REJECTED. But a dropdown field’s presentation is not defined by its internal contents the way a single-line field is, but rather by the defined presentation of the field itself, which you cannot control in list views at all. You can control appearance in a finished document by using custom themes. But you would need a lot of looping conditional testing, and you probably don’t want the quote status appearing on the finished document in the first place.

That said, you can do what you ask if you make the custom field a single line. Using only one line at a time of the following HTML code:

<span style="color:red;font-weight:bold">REJECTED</span>

<span style="color:orange;font-weight:bold">PENDING</span>

<span style="color:blue;font-weight:bold">ACCEPTED</span>

<span style="color:green;font-weight:bold">COMPLETED</span>

you can produce a status column in the Sales Quotes list that looks like this:

58 AM

The problem is that you have to type in all that HTML code every time you want to mark or change status of a quote.

1 Like

Thanks for your time to respond.

Looks like it can’t be done then. pity as it would be a lot better looking on my Sales Quote list. not the end of the world though.

Thanks Again,
Colin.

Can we use a combination of 2 custom fields to achieve this?

Field one is a drop down list that the user selects the status in.

Field 2 is a single line custom field that references custom field 1 and then displays a suitable text and font, colour etc. to suit. This field is ticked to display in the list.

I had a bit of look into the guides and there is info on referencing fields from for the custom themes but I am not sure this applies to code inside a second custom field. Also not with my tiny programming knowledge I am note sure how to execute the necessary ‘if’ or ‘case’ statements to make this work.

This won’t work. You can reference content of a field for arithmetic filtering, not style attributes.

Not sure we are on the same page. To make my muddle clearer.

field 1: Drop down list as follows:
Received
Processed
Delivered

field 2: Single line field with html that references field 1 - in psuedocode :wink: (the best i can do)
if (field1) = Received: display ‘Received’ in red
else if (field 1) = Processed: display ‘Processed’ in orange
else if (field1) = Delivered: display ‘Delivered’ in green
else blank

Apologies if I am barking up the wrong tree but I was thinking of only referencing the data in field 1 to decide what to display in field 2 with no data being copied over at all to be displayed.

Maybe preceding it with a number in field 1 and parsing that number is simpler? I would definitely want to add a number to to front of what is displayed in field 2 so it can sorted in the list into the correct order.

Not sure if that made it clearer or I have just misunderstood your reply.

I understood what you meant, but you could not put your “pseudocode” into a field, even if its syntax were correct. You cannot put a series of executable commands into a field as you have illustrated. You can only insert HTML consistent with the type of field. With only limited exceptions, like the arithmetic filters described in the Guides you mentioned, you can only control the display of information. The program treats contents of custom fields as information to be displayed, not instructions to be executed.

Bother. thought I had a work around. but you don’t know if you don’t ask.

Maybe they would consider making an improvement to the list type custom field?

I just couldn’t see if there was a feature request list anywhere that it could be on.

Only moderators can place suggestions into the ideas category. But you can review the list.