You need to sign in to do that
Don't have an account?
Karla Pliego 3
Code to display 1 column vs 2
Hi, I have the following VF page and it is displaying the fields in 2 colums. How do I make it so that it only shows 1 column. What code Do I need to enter?
Alternatively, how can I modify the order the fields are displayed, what code do I need to enter?
<apex:page standardController="Contact">
<apex:form >
<apex:pageBlock title="New Contact" mode="edit">
<apex:pageBlockButtons >
<apex:commandButton action="{!save}" value="Save"/>
</apex:pageBlockButtons>
<apex:pageBlockSection rendered="{!contact.RecordTypeId == '01241000000A7Ud'}" title="buyer and seller">
<apex:inputField value="{!contact.FirstName}" required="true"/>
<apex:inputField value="{!contact.LastName}" required="true"/>
<apex:inputField value="{!contact.rethink3__Nickname__c}" required="true"/>
<apex:inputField value="{!contact.MobilePhone}" required="false"/>
<apex:inputField value="{!contact.Phone}" required="false"/>
<apex:inputField value="{!contact.Email}" required="false"/>
<apex:inputField value="{!contact.Preferred_Method_Of_Contact__c}" required="true"/>
<apex:inputField value="{!contact.rethink3__Contact_Status__c}" required="false"/>
<apex:inputField value="{!contact.rethink3__Contact_Type__c}" required="true"/>
<apex:inputField value="{!contact.LeadSource}" required="false"/>
<apex:inputField value="{!contact.Lead_Source_Explanation__c}" required="false"/>
<apex:inputField value="{!contact.Contact_For_Lead_Source__c}" required="false"/>
</apex:pageBlockSection>
<apex:pageBlockSection rendered="{!contact.RecordTypeId == '01241000000bfrc'}" title="company contact">
<apex:inputField value="{!contact.FirstName}" required="true"/>
<apex:inputField value="{!contact.LastName}" required="true"/>
<apex:inputField value="{!contact.Phone}" required="false"/>
<apex:inputField value="{!contact.MobilePhone}" required="false"/>
<apex:inputField value="{!contact.Email}" required="false"/>
<apex:inputField value="{!contact.rethink3__Contact_Type__c}" required="true"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
Alternatively, how can I modify the order the fields are displayed, what code do I need to enter?
<apex:page standardController="Contact">
<apex:form >
<apex:pageBlock title="New Contact" mode="edit">
<apex:pageBlockButtons >
<apex:commandButton action="{!save}" value="Save"/>
</apex:pageBlockButtons>
<apex:pageBlockSection rendered="{!contact.RecordTypeId == '01241000000A7Ud'}" title="buyer and seller">
<apex:inputField value="{!contact.FirstName}" required="true"/>
<apex:inputField value="{!contact.LastName}" required="true"/>
<apex:inputField value="{!contact.rethink3__Nickname__c}" required="true"/>
<apex:inputField value="{!contact.MobilePhone}" required="false"/>
<apex:inputField value="{!contact.Phone}" required="false"/>
<apex:inputField value="{!contact.Email}" required="false"/>
<apex:inputField value="{!contact.Preferred_Method_Of_Contact__c}" required="true"/>
<apex:inputField value="{!contact.rethink3__Contact_Status__c}" required="false"/>
<apex:inputField value="{!contact.rethink3__Contact_Type__c}" required="true"/>
<apex:inputField value="{!contact.LeadSource}" required="false"/>
<apex:inputField value="{!contact.Lead_Source_Explanation__c}" required="false"/>
<apex:inputField value="{!contact.Contact_For_Lead_Source__c}" required="false"/>
</apex:pageBlockSection>
<apex:pageBlockSection rendered="{!contact.RecordTypeId == '01241000000bfrc'}" title="company contact">
<apex:inputField value="{!contact.FirstName}" required="true"/>
<apex:inputField value="{!contact.LastName}" required="true"/>
<apex:inputField value="{!contact.Phone}" required="false"/>
<apex:inputField value="{!contact.MobilePhone}" required="false"/>
<apex:inputField value="{!contact.Email}" required="false"/>
<apex:inputField value="{!contact.rethink3__Contact_Type__c}" required="true"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
All Answers