You need to sign in to do that
Don't have an account?
sfg1
display mulitiselect field dynamically onchanging another Picklist field
I have Picklist field "Chart_Flex_Field_1_Datatype__c" with values 'Test1', 'Test2', 'Test3' and 'Test4'. When I select 'Test3', dynamically Multi-select Picklist field (Chart_Flex_Picklist_1__c) should display under "Chart_Flex_Field_1_Datatype__c" field. Please find my code.
<apex:outputField value="{!Project2__c.Chart_Flex_Field_1_Datatype__c}">
<apex:actionSupport event="onchange" rerender="t1" />
</apex:outputField>
<apex:outputField value="{!Project2__c.Chart_Flex_Picklist_1__c}" rendered="{!IF(Project2__c.Chart_Flex_Field_1_Datatype__c == 'Test3', true, false )}" >
<apex:actionSupport event="onchange" rerender="t1" />
</apex:outputField>
<apex:outputField value="{!Project2__c.Chart_Flex_Field_1_Datatype__c}">
<apex:actionSupport event="onchange" rerender="t1" />
</apex:outputField>
<apex:outputField value="{!Project2__c.Chart_Flex_Picklist_1__c}" rendered="{!IF(Project2__c.Chart_Flex_Field_1_Datatype__c == 'Test3', true, false )}" >
<apex:actionSupport event="onchange" rerender="t1" />
</apex:outputField>
Greetings to you!
Please try the below code, I have tested in my org and it is working fine. Kindly modify the code as per your requirement.
Visualforce:
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future.
Thanks and Regards,
Khan Anas