• hlee97
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies

I'm trying to make the Lead address required on the page layout with the red bar in edit mode. We've done it with validation rules but we want the visual cue also. So far I've only been able to figure out how to make it required as a component but not in edit mode.

 

This is where I'm at with the code but it's not working correctly.

 

Is it even possible to make the address required on a standard page layout or do you have to rebuild the entire page? I'm just starting out with VF so any help would be appreciated.

 

 

<apex:page standardController="Lead">
<apex:form >
<apex:pageBlock title="Lead Edit" mode="edit">
    <apex:inputField value="{!Lead.Street}" required="true"/>
    <apex:inputField value="{!Lead.City}" required="true"/>
    <apex:inputField value="{!Lead.State}" required="true"/>
    <apex:inputField value="{!Lead.PostalCode}" required="true"/>
     <apex:inputField value="{!Lead.Country}" required="true"/>
</apex:pageBlock>
</apex:form>
</apex:page>

I'm trying to make the Lead address required on the page layout with the red bar in edit mode. We've done it with validation rules but we want the visual cue also. So far I've only been able to figure out how to make it required as a component but not in edit mode.

 

This is where I'm at with the code but it's not working correctly.

 

Is it even possible to make the address required on a standard page layout or do you have to rebuild the entire page? I'm just starting out with VF so any help would be appreciated.

 

 

<apex:page standardController="Lead">
<apex:form >
<apex:pageBlock title="Lead Edit" mode="edit">
    <apex:inputField value="{!Lead.Street}" required="true"/>
    <apex:inputField value="{!Lead.City}" required="true"/>
    <apex:inputField value="{!Lead.State}" required="true"/>
    <apex:inputField value="{!Lead.PostalCode}" required="true"/>
     <apex:inputField value="{!Lead.Country}" required="true"/>
</apex:pageBlock>
</apex:form>
</apex:page>

I'm trying to make the Lead address required on the page layout with the red bar in edit mode. We've done it with validation rules but we want the visual cue also. So far I've only been able to figure out how to make it required as a component but not in edit mode.

 

This is where I'm at with the code but it's not working correctly.

 

Is it even possible to make the address required on a standard page layout or do you have to rebuild the entire page? I'm just starting out with VF so any help would be appreciated.

 

 

<apex:page standardController="Lead">
<apex:form >
<apex:pageBlock title="Lead Edit" mode="edit">
    <apex:inputField value="{!Lead.Street}" required="true"/>
    <apex:inputField value="{!Lead.City}" required="true"/>
    <apex:inputField value="{!Lead.State}" required="true"/>
    <apex:inputField value="{!Lead.PostalCode}" required="true"/>
     <apex:inputField value="{!Lead.Country}" required="true"/>
</apex:pageBlock>
</apex:form>
</apex:page>

Is there a way to add VF code in the edit mode to put a red bar or some how highlight a standard field in edit mode?

 

The reason I ask is we are using validation rules to make some standard address fields that the page layout will not let you make required. But there is no visual indicator until the user tries to save the record.

  • May 24, 2012
  • Like
  • 0