Tag Archives: Page Block

Show =required information along with red bar on the Page Block section of VF Page

Set the apex:pageBlock mode="edit".

<apex:page standardController="Account">
	<apex:form>
        <apex:pageBlock mode="edit" title="Account">
            <apex:pageBlockButtons >
                <apex:commandButton action="{!save}" value="Save"/>
            </apex:pageBlockButtons>
            <apex:outputPanel>
                <apex:pageBlockSection columns="2" title="Account Information">
                    <apex:inputField value="{!Account.Name}" required="true"/>
                    <apex:inputField value="{!Account.Phone}"/>
                </apex:pageBlockSection>
            </apex:outputPanel>
        </apex:pageBlock>
    </apex:form>
</apex:page>