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
Angela SchloederAngela Schloeder 

Specific fields into 2nd column

I'm sure this is a simple question, how can I get specific fields into the 2nd column?

<apex:pageBlockSection columns="1" title="Account Details" collapsible="false">
                    <apex:outputField value="{!Account.Name}" />
                </apex:pageBlockSection>
                <apex:pageBlockSection >
                    <apex:outputField value="{!Account.Website}" />
                    <apex:outputField value="{!Account.NumberOfEmployees}" />
                    <apex:outputField value="{!Account.AnnualRevenue}" />
                </apex:pageBlockSection>
                <br/>
                <apex:pageBlockSection columns="1">
                    <apex:outputField value="{!Account.Description}" />

User-added image
Best Answer chosen by Angela Schloeder
KaranrajKaranraj
Try the below updated code
<apex:pageBlockSection columns="1" title="Account Details" collapsible="false">
          <apex:outputField value="{!Account.Name}" />
</apex:pageBlockSection>
<apex:pageBlockSection columns="2"> 
          <apex:outputField value="{!Account.Website}" />
           <apex:outputField value="{!Account.AnnualRevenue}" />
           <apex:outputtext ></apex:outputtext> 
            <apex:outputField value="{!Account.NumberOfEmployees}" />
</apex:pageBlockSection>

 

All Answers

KaranrajKaranraj
Try the below code
<apex:pageBlockSection columns="2" title="Account Details" collapsible="false">
          <apex:outputField value="{!Account.Name}" />
          <apex:outputtext ></apex:outputtext> 
          <apex:outputField value="{!Account.Website}" />
           <apex:outputField value="{!Account.AnnualRevenue}" />
           <apex:outputtext ></apex:outputtext> 
            <apex:outputField value="{!Account.NumberOfEmployees}" />
</apex:pageBlockSection>

 
Angela SchloederAngela Schloeder
Thank you Karanraj, That has gotten me real close, but I still need the Account Name on a line by itself, because sometimes it is long. [cid:e5022607-51ba-4acc-964b-c1abd0fe912f] Angela
Angela SchloederAngela Schloeder
User-added image
KaranrajKaranraj
Try the below updated code
<apex:pageBlockSection columns="1" title="Account Details" collapsible="false">
          <apex:outputField value="{!Account.Name}" />
</apex:pageBlockSection>
<apex:pageBlockSection columns="2"> 
          <apex:outputField value="{!Account.Website}" />
           <apex:outputField value="{!Account.AnnualRevenue}" />
           <apex:outputtext ></apex:outputtext> 
            <apex:outputField value="{!Account.NumberOfEmployees}" />
</apex:pageBlockSection>

 
This was selected as the best answer
Angela SchloederAngela Schloeder
Thank you so much!! That's perfect!!