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
ifthikar ahmedifthikar ahmed 

visual force basics

HI All,

below is my coding ..

<apex:page standardController="Account" >
<apex:pageBlock  >
    <apex:form >
            <apex:inputField Value="{! Account.AccountNumber}"  /> 
    </apex:form>
    </apex:pageBlock>
</apex:page>

in the output  i am just geting the inputField alone but not its lable why ??
where in i refered some vidio ,where lable is also displayed just by using <apex:inputField Value="{! Account.AccountNumber}"  />
Raju yadavRaju yadav
Hi ifthikar ahmed,
 You Should use as follow to get level of field.
<apex:page standardController="Account" >
    <apex:form >
        <apex:pageBlock>
            <apex:pageBlockSection>
                <apex:inputField Value="{! Account.AccountNumber}"  /> 
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>

Thanks
Deepali KulshresthaDeepali Kulshrestha
Hi ifthikar,

- I read your problem and implemented it in my Org and it is working fine.
- Please use the below code [Solved] : -
 
<apex:page standardController="Account" >
    <apex:form >
    <apex:pageBlock  >
        <apex:pageBlockSection>
            <apex:inputField label="Account Number"  Value="{! Account.AccountNumber}"/>
        </apex:pageBlockSection>
    </apex:pageBlock>
    </apex:form>
</apex:page>


I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks and Regards,
Deepali Kulshrestha.
Ajay K DubediAjay K Dubedi
Hi ifthikar,
Please put your input field between <apex:pageBlockSection> tag.this will give you label name too.
Try the below link to learn more about page block section and let me know if it works for you-

https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_pageBlockSection.htm

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks,
Ajay Dubedi