3. Change the color of the lead field in Kommo
Change the color of a particular field:
cssParamsGreen = {'background':'rgb(229, 255, 243)', 'padding-left': '5px','border-radius':'4px','border': '1px solid rgb(178, 225, 198)'};
ARRAYFORMULA(
CSS(SELECTOR(false, '.linked-form__field[data-id="43921"] .linked-form__field__value',true),cssParamsGreen)
)
false;
You can change the following: background, border, padding to your custom values and colors. data-id=«43921» - can be changed to your field ID.
Change the color of a particular field according to its value:
cssParamsGreen = {'background':'rgb(229, 255, 243)', 'padding-left': '5px','border-radius':'4px','border': '1px solid rgb(178, 225, 198)'};
cssParamsRed = {'background':'rgb(255, 244, 244)', 'padding-left': '5px','border-radius':'4px','border': '1px solid rgb(255, 192, 192)'};
ARRAYFORMULA(
IF(lead.cf43923>=1000,CSS(SELECTOR(false, '.linked-form__field[data-id="43923"] .linked-form__field__value',true),cssParamsGreen),CSS(SELECTOR(false, '.linked-form__field[data-id="43923"] .linked-form__field__value',true),cssParamsRed))
)
false;
Here you can also change the field background and borders settings. If lead.cf43923 >= 1000, change its color to cssParamsRed, otherwise cssParamsGreen. Change to your custom values.
Change the color of the lead field depending on the values of other field:
cssParamsGreen = {'background':'rgb(229, 255, 243)', 'padding-left': '5px','border-radius':'4px','border': '1px solid rgb(178, 225, 198)'};
cssParamsRed = {'background':'rgb(255, 244, 244)', 'padding-left': '5px','border-radius':'4px','border': '1px solid rgb(255, 192, 192)'};
cssParamsYellow = {'background':'rgb(240, 247, 154)', 'padding-left': '5px','border-radius':'4px','border': '1px solid rgb(255, 192, 192)'};
ARRAYFORMULA(
IF((lead.cf43929.value-10800)==DATEUNIX(DATEFORMAT(NOW(),'M.D.YYYY')),CSS(SELECTOR(false, '.linked-form__field[data-id="43931"] .linked-form__field__value',true),cssParamsYellow),IF(lead.cf43929.value>DATEUNIX(DATEFORMAT(NOW(),'M.D.YYYY')),CSS(SELECTOR(false, '.linked-form__field[data-id="43931"] .linked-form__field__value',true),cssParamsGreen),CSS(SELECTOR(false, '.linked-form__field[data-id="43931"] .linked-form__field__value',true),cssParamsRed)))
)
false;
If the field 43929 value is equal to the current date, the background color of the field 43931 changes into «yellow». If the value is bigger - the color will be green, if less - red. Change to your custom values or conditions.