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
louisa barrett 7louisa barrett 7 

Apex controls on separate lines within output panel on visualforce page

HI,

Could anyone tell me how to get each control to be on a separate line?
I thought it was doing this by default, but my outputLabels and inputCheckboxes aren't.
Clone Invoice To and Clone Project Contacts should be on separate lines with either the corresponding checkbox next to them or direclty underneath 

User-added image


This section is within a PageBlock > PageBlockSection and then I have two PageBlockSectionItems. I've put it within an ouputPanel because of the restriction of only having 2 child components.

Many thanks for any help.

<apex:pageBlockSectionItem labelStyle="width:2%" dataStyle="width:10%" dataTitle="Select field to clone">
                        <apex:outputPanel>
                            <apex:outputLabel value="Opportunity to Clone" for="selectedOpp"/>
                            <apex:inputText id="selectedOpp" value="{!selectedOpportunity.Name}" disabled="true" />
                            
                            <apex:outputLabel value="Opportunity name" for="oppName"/>
                            <apex:inputText id="oppName" />
                            
                            <apex:outputLabel value="Stage" for="oppStage"/>
                            <apex:inputField id="oppStage" value="{!selectedOpportunity.StageName}"/>
                                          
                            <apex:outputLabel value="Close Date" for="oppCloseDate"/>
                            <apex:inputField id="oppCloseDate" value="{!selectedOpportunity.CloseDate}"/>
                            
                            <apex:outputLabel value="Live Date" for="oppLiveDate"/>
                            <apex:inputfield id="oppLiveDate" value="{!selectedOpportunity.Expected_Live__c}"/>
                                                   
                            <apex:outputLabel value="Clone Invoice To: " for="invoiceToSelected" />
                            <apex:inputCheckbox id="invoiceToSelected" title="Clone Invoice To" selected="true" />
                            
                            <apex:outputLabel value="Clone Project Contacts: " for="projectContactsSelected"/>
                            <apex:inputCheckbox id="projectContactsSelected" title="Clone Project Contacts" selected="true" />
                            
                            <!--<apex:outputLabel value="Invoice To count: " for="oppInvoiceTo"></apex:outputLabel>
                            <apex:inputField id="oppInvoiceTo" value="{!selectedOpportunity.Invoice_To_Count__c}" />-->
                                                
                            <!--<apex:outputLabel value="Purchase Order Attachment" for="purchaseOrderSelected"></apex:outputLabel>
                            <apex:inputCheckbox id="purchaseOrderSelected" label="Purchase Order Attachment" title="Clone Purchase Order Attachment" selected="true" />
                            <apex:inputText id="oppPurchaseOrderAtt" disabled="true" />-->

                            <!--<apex:outputLabel value="Number of contacts: " for="oppProjectContacts"></apex:outputLabel>
                            <apex:inputField id="oppProjectContacts" value="{!selectedOpportunity.Invoice_To_Count__c}" />-->                                            
                        </apex:outputPanel>
                        
                    </apex:pageBlockSectionItem>
Best Answer chosen by louisa barrett 7
LakshmanLakshman
You may want to try adding a simple <br/> in between those checkbox fields as a simple solution.

All Answers

LakshmanLakshman
You may want to try adding a simple <br/> in between those checkbox fields as a simple solution.
This was selected as the best answer
louisa barrett 7louisa barrett 7
Always the simplest answer :)
Thank you very much.