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
Daniel BleasdaleDaniel Bleasdale 

How do I go about highlighting blank fields?

So if the output is blank or a default value I would like it to highlight, is this possible, if so how?
User-added image
Best Answer chosen by Daniel Bleasdale
GauravGargGauravGarg
Hi Daniel,

I have implemented the same functionality in my client's org. I can show you the image below. Here what I did:
  • Created a VF page with Extension
  • In the extension, 
    • Create a constructor load the default values and process them with business logic. 
    • Created Wrapper Class within Extension class having following variables
      • Name of Field
      • Value
      • isHighlighted
    • In the constructor, as per the business process load the values in Wrapper class. 
  • In VF page, loop over Wrapper variable "getter,setter".
  • Place apex:outputPanel at the top of every field Label: Value combination
    • in apex:outputPanel place style="{! IF(WrapperVariable.isHighlighted,background-color:Yellow,False)}"

Hope this helps you. Please check my images of highlighted fields below.  Apologies, the image is marked as blurred. 
User-added image

Hope this help you, let me know if need more details on it. 


Thanks,

Gaurav
Skype: gaurav62990
Email: gauravgarg.nmims@gmail.com