function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

How to create your custom indicator for required field

I was wondering what will be the best way to create a custom indicator for required field. 
Standard one always show Red color indicator , how to go about creating a different color indicator for VF page.
Is it through Image or Is is through style attribute? Iam not sure what is the best way to do 
Pankaj MehraPankaj Mehra
Hi Ashish,

If you only need to change the color of the indicator you can override the default CSS in vf page as follow:

.bPageBlock .requiredInput .requiredBlock {
background-color: #c00 !important;

If you need to do completely different styling then add some differernt style from css, modify style attribute of input field and handle validation in apex class.

Thanks,  Yes I have tried different kind of css and all type of hacking but I want red bar beside outputfield that is having inlineediting.