- OtherStreet
- OtherPostalCode
- OtherCity
- OtherCountry
- OtherState
Mailing Address Fields:
- MailingStreet
- MailingCity
- MailingCountry
- MailingState
- MailingPostalCode
Sample Code:
Visualforce page:
<apex:page controller=”Sample” sidebar=”false”>
<apex:form >
<apex:pageblock mode=”edit”>
<apex:pageblockSection title=”Contact Information”>
<apex:inputField value=”{!cont.FirstName}”/>
<apex:inputField value=”{!cont.Lastname}”/>
<apex:pageblockSectionItem >
Address
<apex:inputField value=”{!cont.OtherStreet}”/>
</apex:pageblockSectionItem>
<apex:pageblockSectionItem >
Postal Code
<apex:inputField value=”{!cont.OtherPostalCode}”/>
</apex:pageblockSectionItem>
<apex:pageblockSectionItem >
Postal City
<apex:inputField value=”{!cont.OtherCity}”/>
</apex:pageblockSectionItem>
<apex:pageblockSectionItem >
Postal Country
<apex:inputField value=”{!cont.OtherCountry}”/>
</apex:pageblockSectionItem>
<apex:inputField value=”{!cont.Email}”/>
<apex:inputField value=”{!cont.Phone}”/>
<apex:inputField value=”{!cont.MobilePhone}”/>
<apex:inputField value=”{!cont.OtherPhone}”/>
<apex:inputField value=”{!cont.Birthdate}”/>
</apex:pageblockSection>
<apex:pageblockButtons location=”bottom” >
<apex:commandButton value=”Save”/>
<apex:commandButton value=”Cancel”/>
</apex:pageblockButtons>
</apex:pageblock>
</apex:form>
</apex:page>
Apex Controller:
public with sharing class Sample
{
public Contact cont {get;set;}
}
Output: