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
umesh1234umesh1234 

How to select Multiple Values from Dropdown?

I have one Country text field in VF page i am converting into  select option i can able to select values. but i want to select multiple values from dropdown list using check box(multi seklect)? 
LBKLBK
You need a multi select picklist type field.

It will look like the following screen shot in your VF page.

User-added image

If you want to have a different UI element (like a dropdown with a checkbox against each entries), you need to explore a JS framework like jQuery.
umesh1234umesh1234
No...@LBK
umesh1234umesh1234
I need dwopdown with select option..
Akshit HuriaAkshit Huria
Hi Sanvi
 you can use below  code snippet:-
 
<apex:selectList value="{!countries}" multiselect="true">
     <apex:selectOptions value="{!items}"/>
</apex:selectList>

you can also refer here  https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_selectList.htm

Thank You
Akshit