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
Parteek Goyal 3Parteek Goyal 3 

How to use Multiselect Picklist in Visualforce

Hi All,

I want to use multiselect picklist in visualforce page. Can anybody tell how it's possible.
Please help me
Best Answer chosen by Parteek Goyal 3
Tejpal KumawatTejpal Kumawat
Hello Parteek,

You can use multiselect picklist, same as other fields in Visualforce page.

Taking an Example :
Create multiselect picklist custom Field on Account : Test__c with values {A, B, C, D}

Test this page :
<apex:page standardController="Account">
    <apex:form>
        <apex:inputField value="{!account.Test__c}"/>
    </apex:form>
</apex:page>

If this answers your question then hit Like and mark it as solution!

All Answers

Tejpal KumawatTejpal Kumawat
Hello Parteek,

You can use multiselect picklist, same as other fields in Visualforce page.

Taking an Example :
Create multiselect picklist custom Field on Account : Test__c with values {A, B, C, D}

Test this page :
<apex:page standardController="Account">
    <apex:form>
        <apex:inputField value="{!account.Test__c}"/>
    </apex:form>
</apex:page>

If this answers your question then hit Like and mark it as solution!
This was selected as the best answer
Tejpal KumawatTejpal Kumawat
Hello Parteek,

If this answers your question mark Best Answer it as solution, It will help others!
Harikrishna MandadapuHarikrishna Mandadapu
Hi Tejpal, After I select any value from the picklist the size is getting disturbed. Can you help me out of this.