I have been struggling to figure out how to change text colors based on field values in list views. The code I have been able to find on the forum and the knowledge base has been useful for changing the text color on a details view but once there are multiple of the same fields displayed in the view it does not work.
Ideally I would like if the field value is “Overdue” that the text and background be changed.
I understand this can be done with Javascript but, however I’m not particularly strong in coding, I’ve just been able to substitute certain pieces of code to get a result so far. Any help would be appreciated.
I asked KTL to
1- highlight with red text on yellow background all text containing “C1”
2- highlight with blue text on green background all text with an exact match of “Screwdriver”
This works with Details and Grid views, and maybe others - I haven’t tested yet.
All you have to do is install KTL (see here: Installing KTL) and set your views description with the keyword _cfv (Colorize Fields by Value) like this: _cfv=c,C1,red,yellow,x,Screwdriver,blue,palegreen
Thank you for this! I will try it out and get back to you. In the meantime what I have done is
Set the list view to not show blank fields
Added additional individual fields for each field in my table, so instead of having Completed, Overdue and Upcoming in one multiple choice field, Each option has its own field which can either be blank or Completed, Overdue etc.
Using CSS I have set each field to my required colour and formatting.
I have then set up a rule on my forms to blank the other fields and leave only the current status field with a value.
Now only the fields that have values in them will be displayed in the required format. I don’t think this is the best way but just so I can at least have a workable prototype whilst I learn javascript.
My app will mostly be used by clients on their phones to track their farm tasks, it looks beautiful on a laptop however the calendar on mobile does not look great and the tables, although I have setup the built in table field formatting, the tables require a lot of scrolling on phones which is not great for the user experience in my opinion. I’ve settled on a list view of the tasks and by color coding important information I think it might be a better experience on mobile. I have embedded the app on a page and my next step is to create a code that will show the list view when a mobile display is detected, so I’ve got a lot to learn.