Colors for field depending on its content in list and detail view of a custom entity

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gribs
    Senior Member
    • May 2015
    • 104

    Colors for field depending on its content in list and detail view of a custom entity

    Hi,

    I want that a different color appears depending on the content of an enum field.

    Example : in my custom entity, field "Status", I have "Free", "Changed", "Deleted" options, and I want a green color for the "Free" text, orange color for "Changed", red color for "Deleted".

    I searched but I didn't found anything for this. I tried to reproduce like in Task entity (when there is an overpassed date its red) but no luck

    Can you help me with please?

    Do you plan to implement colors options in entity manager btw?

    thank you
  • yuri
    Member
    • Mar 2014
    • 8485

    #2
    Hi

    application/Espo/Modules/Crm/Resources/metadata/entityDefs/Lead.json

    status > style
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    • scratch
      Junior Member
      • Sep 2016
      • 15

      #3
      hi, sorry if i reply to this old post but i need the same.
      i try to edit Lead.json in "style" i try to add for "New" the red color:

      "style": {
      "New": "#ff4",
      "Converted": "success",
      "Recycled": "danger",
      "Dead": "danger"
      }

      but this don't work,
      can you give me a example for chance this color in lead.json?
      Many tnx
      regards

      Comment

      • tarasm
        Super Moderator
        • Mar 2014
        • 573

        #4
        Did you do "Clear local cache"?
        Job Offers and Requests

        Comment

        • scratch
          Junior Member
          • Sep 2016
          • 15

          #5
          tnx for the reply,
          now work but the word "New" is changed to word "#ff4"
          but i want to chance color at the "New" world.

          what i have to write for change this?
          many tnx again

          Comment

          • tanya
            Senior Member
            • Jun 2014
            • 4308

            #6
            Hi, I'm trying espocrm few days. like this a lot. I would just like to be able to change the color of the words in the fields, for example, for the priority.

            you can declare new css class .text-[yourType] and use any color

            Comment

            Working...