Issue with Standard Forms in Salesforce ?
In Standard record Edit Page, there's no way we can hide/show a set of Fields for Users to Fill In. This is the big issue when you have hundreds of fields that gets presented to the User.How to solve with visualforce Page ?
In visualforce page, this problem can be solved by showing/hiding different sections based on the 'certain value' in Fields (or) certain User Action.Where is the Code ?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<apex:page standardController="Opportunity"> | |
<apex:sectionHeader title="Application - Basic Information"/> | |
<apex:outputLabel value="Name - "/> | |
<apex:outputField value="{!Opportunity.Name}"/> | |
<apex:form> | |
<!-- Check Box --> | |
<apex:outputLabel value="Do you want to edit ?"/> | |
<apex:inputCheckbox value="{!Opportunity.isClosed}"> | |
<apex:actionSupport event="onchange" rerender="EditSection"/> | |
</apex:inputCheckbox> | |
<!-- Edit Section --> | |
<apex:outputPanel id="EditSection"> | |
<apex:outputPanel layout="none" rendered="{!Opportunity.isClosed}"> | |
<apex:sectionHeader title="Edit Section"/> | |
<apex:pageBlock> | |
<apex:pageBlockSection> | |
<apex:inputField value="{!Opportunity.Description}"/> | |
<apex:inputField value="{!Opportunity.CloseDate}"/> | |
</apex:pageBlockSection> | |
</apex:pageBlock> | |
</apex:outputPanel> | |
</apex:outputPanel> | |
</apex:form> | |
</apex:page> |
No comments:
Post a Comment
Thanks for reading my blog !