Announcement

Collapse
No announcement yet.

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

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #2
    Hi

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

    status > style

    Comment


    • #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


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

        Comment


        • #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


          • #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...
            X