You need to sign in to do that
Don't have an account?
Riby Varghese
How to hide output label ?
I want to hide the output label,only required the particular action is performed.
<apex:page standardController="Case">
<apex:form >
<apex:pageBlock >
<apex:pageBlockSection id="thePageBlockSection1">
<apex:pageblockSectionItem >
<apex:outputLabel value="Action"></apex:outputLabel>
<apex:actionRegion >
<apex:inputField value="{!case.Action__c}">
<apex:actionSupport event="onchange" reRender="opTxt1, opTxt2, opTxt3"/>
</apex:inputField>
</apex:actionRegion>
</apex:pageblockSectionItem>
<apex:pageblockSectionItem id="pbsItem1">
<apex:outputLabel value="Pin" ></apex:outputLabel>
<apex:outputPanel id="opTxt1">
<apex:inputField id="pin" value="{!case.Pin__c}" rendered="{!if(case.Action__c== 'Pin Reset', true, false)}"/>
</apex:outputPanel>
</apex:pageblockSectionItem>
<apex:pageblockSectionItem id="pbsItem2" >
<apex:outputLabel ></apex:outputLabel>
<apex:outputPanel id="opTxt2">
<apex:inputField id="txt2" value="{!case.Password__c}" rendered="{!if(case.Action__c== 'Password Reset', true, false)}"/>
</apex:outputPanel>
</apex:pageblockSectionItem>
<apex:pageblockSectionItem id="pbsItem3" >
<apex:outputLabel value="Text 3"></apex:outputLabel>
<apex:outputPanel id="opTxt3">
<apex:inputField label="text" id="txt3" value="{!case.Replacement_Card__c}" rendered="{!if(case.Action__c== 'Replacement Card', true, false)}"/>
</apex:outputPanel>
</apex:pageblockSectionItem>
</apex:pageBlockSection>
<apex:pageBlockButtons >
<apex:commandButton value="Save" action="{!save}"/>
</apex:pageBlockButtons>
</apex:pageBlock>
</apex:form>
</apex:page>
Any Idea?
<apex:page standardController="Case">
<apex:form >
<apex:pageBlock >
<apex:pageBlockSection id="thePageBlockSection1">
<apex:pageblockSectionItem >
<apex:outputLabel value="Action"></apex:outputLabel>
<apex:actionRegion >
<apex:inputField value="{!case.Action__c}">
<apex:actionSupport event="onchange" reRender="opTxt1, opTxt2, opTxt3"/>
</apex:inputField>
</apex:actionRegion>
</apex:pageblockSectionItem>
<apex:pageblockSectionItem id="pbsItem1">
<apex:outputLabel value="Pin" ></apex:outputLabel>
<apex:outputPanel id="opTxt1">
<apex:inputField id="pin" value="{!case.Pin__c}" rendered="{!if(case.Action__c== 'Pin Reset', true, false)}"/>
</apex:outputPanel>
</apex:pageblockSectionItem>
<apex:pageblockSectionItem id="pbsItem2" >
<apex:outputLabel ></apex:outputLabel>
<apex:outputPanel id="opTxt2">
<apex:inputField id="txt2" value="{!case.Password__c}" rendered="{!if(case.Action__c== 'Password Reset', true, false)}"/>
</apex:outputPanel>
</apex:pageblockSectionItem>
<apex:pageblockSectionItem id="pbsItem3" >
<apex:outputLabel value="Text 3"></apex:outputLabel>
<apex:outputPanel id="opTxt3">
<apex:inputField label="text" id="txt3" value="{!case.Replacement_Card__c}" rendered="{!if(case.Action__c== 'Replacement Card', true, false)}"/>
</apex:outputPanel>
</apex:pageblockSectionItem>
</apex:pageBlockSection>
<apex:pageBlockButtons >
<apex:commandButton value="Save" action="{!save}"/>
</apex:pageBlockButtons>
</apex:pageBlock>
</apex:form>
</apex:page>
Any Idea?
Sorry for this issue you are encountering.
May I suggest you please check with below blog post which might help you further with the above requirement.
- https://www.linkedin.com/pulse/salesforce-how-hide-fieldssections-value-cristhian-gertner
Please let us know if this helps.Thanks,
Nagendra