Question

Change the virtual field colour based on the value change in that field

Hi Team,

 

We have a virtual field, whenever value changes in that field, based on the value, colour should change for that field

 

We tried the usual CSS method for this and it seems to be not working

 

Kindly help us resolve the same

 

Thanks & Regards ,

Saranya

Like 0

Like

3 comments

Danyil Onoprienko,



I have gone through the above-mentioned links, But I think these links will not serve our business case.



We have a virtual column in our Edit-Page which is of type Text. The use case is to change the color of the field value to green when it reaches 100%.



 Ref link: 

https://community.creatio.com/questions/how-add-custom-style-control-pa…

https://community.creatio.com/questions/changing-background-color-lookup



Code:









On removing the CSS condition I am able to see the CSS change in my virual column value. But on adding the condition I couldn't.



I am not sure, where its been missing. Kindly, Help me out with case?



Regards,

Adharsh S

Adharsh,

 

Hello,



Please use the following CSS selector to achieve the result required:

div#ContactPageV2UsrPercentageTextTextEdit-wrap.base-edit.ts-box-sizing

In my case the element on the page has the UsrPercentageText code and the element can be found in the page inspector:

so the complete CSS would be:

div#ContactPageV2UsrPercentageTextTextEdit-wrap.base-edit.ts-box-sizing[iscategoryred="true"] {
    color: green;
    font-size: 1.5em;
    font-weight: 700;
}

Best regards,

Oscar

Show all comments