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
Shiv ShankarShiv Shankar 

when i am puttin <apex:inputField> in <apex:pageBlockSectionItem> it's label goes off

when i am puttin <apex:inputField> in <apex:pageBlockSectionItem> it's label goes off . Why ?

When i put it in <apex:pageBlockSection> it works fine.

BudduBuddu

We can use <apex:inputfield> in <apex:pageblock sectionitem> and in order to display the lable it should be taken in the form of <apex:outputlable>.The following example teaches you how to use..............................

 

 

<apex:page standardController="Account">
    <apex:form>
        <apex:pageBlock title="My Content" mode="edit">
            <apex:pageBlockButtons>
                <apex:commandButton action="{!save}" value="Save"/>
            </apex:pageBlockButtons>

            <apex:pageBlockSection title="My Content Section" columns="2">
                <apex:pageBlockSectionItem>
                    <apex:outputLabel value="Account Name" for="account__name"/>
                    <apex:inputText value="{!account.name}" id="account__name"/> 
                </apex:pageBlockSectionItem>

                <apex:pageBlockSectionItem>
                    <apex:outputLabel value="Account Site" for="account__site"/>
                    <apex:inputText value="{!account.site}" id="account__site"/> 
                </apex:pageBlockSectionItem>

                <apex:pageBlockSectionItem>
                    <apex:outputLabel value="Account Type" for="account__type"/>
                    <apex:inputText value="{!account.type}" id="account__type"/> 
                </apex:pageBlockSectionItem>

                <apex:pageBlockSectionItem>
                    <apex:outputLabel value="Account Number" for="account__number"/>
                    <apex:inputText value="{!account.accountNumber}" id="account__number"/> 
                </apex:pageBlockSectionItem> 
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>