Question

How to change the background color of a field on a page

Hello

 

Is there a way to change the background of a field on a section page.

For example, email field on Contact section background will be light grey.

 

I know how to create a CSS module and add it to my schema.

Like 0

Like

4 comments

Dear Oren,

 

In order to resolve the issue please use the article by the link below:

 

https://community.creatio.com/questions/how-change-background-color-case-status-mobile-list-view

 

Please feel free to use dev tools in order to find a correct css selector for a field.

 

Best regards,

Norton

Hello Oren,

 

I have an article on that topic as well here: https://customerfx.com/article/adding-custom-css-style-sheets-in-bpmonl…

 

Basically, if you already know how to add the CSS schemas, you'll just use inspector/devtools to determine the id of the element and then add to the CSS with a background-color. 

 

Ryan

Thanks a lot Norton and Ryan

 

Ryan, your articles, as always, are enlightening .

 

Ryan Farley,

Hi Ryan,

 

The above article works fine by default.

 

I trying to set the background colour for a filed based on Certain condition. Im not able to achieve that. Is there any post or anything where you can guide me on the same?

 

in the below code, line 1-4 does not work. But, if i remove "[isFontChange= "true"]" from line 1, it by default highlights the value of the specified field. 

 

I want to highlight the value based on condition. Kindy help me achieve the same

 

/*#AccountPageV2AccountNameundefined-el[isFontChange= "true"]{

    color:#046630;

    background:#F8FC00;

}*/

.label-wrap .t-label[isFontChange= "true"]{

    color:#1E8BDC;

    background:#F8FC00;

}

 

method:

 

nameFieldBackgroundChange:function(){

                window.console.log("Font Change");

                var result={isFontChange:false};

                //var dccimembershipnumber = this.get("UsrDCCIMembershipNumber");

                window.console.log(dccimembershipnumber);

                if(dccimembershipnumber!==""){

                    result.isFontChange=true;

                    

                }

                window.console.log(result);

                return result;

                

            }

 

diff:

{

              "operation": "merge",

                        "name": "AccountName",

                        "parentName": "ProfileContainer",

                        "propertyName": "items",

                        /*"values": {

                            "afterrender":{"bindTo":"nameFieldBackgroundChange"},

                            "afterrerender":{"bindTo":"nameFieldBackgroundChange"}

                        }*/

                "values":{

                "domAttributes": {"bindTo":"nameFieldBackgroundChange"}

                }

            },

Show all comments