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
ckellieckellie 

Displaying a fields when cooresponding multi pcklist values are selected

I have a business case where I need to display the corresponding input field when a value has been selected. For example: when Phone and fax fields have been selected as to what needs to be added, the cooresponding Phone and fax fields will be displayed. Currently my code is:

 

<apex:actionRegion > <apex:pageblockSection columns="1" > <apex:pageBlockSectionItem > <apex:outputLabel value="What Information needs to be Corrected?" id="thePageBlock1"/> <apex:outputPanel > <apex:inputfield value="{!Manufacturing_Design_Sheet__c.What_Information_needs_to_be_Corrected__c}"> <apex:actionSupport event="onclick" rerender="thePageBlock1" status="status1"/> </apex:inputField> <apex:actionStatus startText="applying value..." id="status1"/> </apex:outputPanel> </apex:pageBlockSectionItem><apex:pageBlockSectionItem > <apex:outputLabel value="Correct the Information"/> <apex:outputPanel > <apex:inputfield value="{!Manufacturing_Design_Sheet__c.Correct_the_Information__c}"> <apex:actionSupport event="onclick" rerender="thePageBlock" status="status"/> </apex:inputField> <apex:actionStatus startText="applying value..." id="status"/> </apex:outputPanel> </apex:pageBlockSectionItem> </apex:pageblockSection> </apex:actionRegion> <apex:pageBlockSection columns="1" rendered="{!Manufacturing_Design_Sheet__c.Correct_the_Information__c==true}"> <apex:inputfield value="{!Manufacturing_Design_Sheet__c.Technical_Phone__c}" /> </apex:pageBlockSection> <apex:pageBlockSection columns="1" rendered="{!And(Manufacturing_Design_Sheet__c.Correct_the_Information__c==true, Manufacturing_Design_Sheet__c.What_Information_needs_to_be_Corrected__c=='Commercial Phone') }"> <apex:inputfield value="{!Manufacturing_Design_Sheet__c.Commercial_Phone__c}" /> </apex:pageBlockSection>

 

 

Any suggestions? Do I need to run the logic to disply the fields in my trigger?

jpwagnerjpwagner
you'll want to re-post in "visualforce development"
ckellieckellie
Thank you.