Announcement

Collapse
No announcement yet.

color for all fields in list view

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

  • color for all fields in list view

    Hello,

    We can have custom color for a field using enum-style. But it sets the color for only that field.

    How can we have the same color for all fields belongs to that row, depending on the value of a particular field?

    Please help.




  • #2
    Hi,

    entityDefs with these fields, please

    Comment


    • #3
      Hi Tanya,

      In accounts, I have one status field

      "status": {
      "type": "enum",
      "required": false,
      "options": [
      "pendingAuth",
      "authorized"
      ],
      "default": "pendingAuth",
      "isSorted": false,
      "audited": false,
      "readOnly": false,
      "tooltip": false,
      "isCustom": true,
      "style": {
      "pendingAuth": "danger",
      "authorized": "success"
      },
      },

      This works fine for status field.
      I need to color all the remaining fields like below based on value of status field. If the status is pending, I need all of these fields to be in red otherwise green.

      "name": {
      "type": "varchar",
      "required": true,
      "trim": true
      },
      "website": {
      "type": "url"
      },
      "emailAddress": {
      "type": "email"
      },
      "phoneNumber": {
      "type": "phone",
      "typeList": ["Office", "Mobile", "Fax", "Other"],
      "defaultType": "Office"
      },

      Please help.

      Thank you.

      Comment


      • #4
        Define views for all fields, afterRender for detail and search mode copy the class of status and own view based on "view": "views/fields/enum-styled" for status field, after changed - reRender all the fields or add them all own class

        Comment


        • #5
          Thank you so much Tanya, Will try like this way.

          Comment

          Working...
          X