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
Karla Pliego 3Karla 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>
Best Answer chosen by Karla Pliego 3
Karla Pliego 3Karla Pliego 3
Awesome!! Thanks!!!

All Answers

Ashish DevAshish Dev
User columns property in both of your pageblocksections like below
 
<apex:pageBlockSection  title="buyer and seller" columns="1"> 


 <apex:pageBlockSection title="company contact" columns="1">

 
Karla Pliego 3Karla Pliego 3
Awesome!! Thanks!!!
This was selected as the best answer