1

I have multi-select picklist field in my custom object how to show multi select ui in vf page ?

2
  • 1
    What have you tried so far? Please include the visualforce page you have so far (if you are working on one)?
    – Derek F
    Commented Apr 28, 2017 at 13:05
  • 1
    Have you tried this? <apex:inputField value="{!customObject.MultiSelect_Field__c}" />
    – d_k
    Commented Apr 28, 2017 at 13:57

2 Answers 2

3

There isn't an apex:... tag that presents side by side select lists to allow easy mult-select.

So if that is what you want, I suggest you use this Salesforce authored open source Visualforce-Multiselect-Picklist.

(While you could use Caspar's Lightning Component, embedding a component in Visualforce means the component UI won't show up until after both the Lightning framework has first loaded and then the component itself has loaded: this could mean a delay of 5 seconds or more after the page has appeared before that part of the page is filled in. Visualforce components by contrast are merged into the page on the server side and so render at the same time as the rest of the page.)

2
  • Ohh, that's a nice thing to have laying around.
    – sfdcfox
    Commented Apr 28, 2017 at 14:21
  • Feature like that amaze me.So much to learn from you guys.Thanks
    – Samir
    Commented Apr 28, 2017 at 15:19
2

If you are happy embedding a lightning component in your visualforce page, you can use my super snazzy draggable multicolpicklist. It's here on github

Embed it in your page like this:

<apex:page showHeader="false" sidebar="false" >
  <apex:includeLightning />
    <div id="lightning" />
    <script>
        $Lightning.use("c:MultiSelectPicklistApp", function () {
          $Lightning.createComponent("c:MultiSelectPicklist", {},
             lightning, function (component) {});
        });
    </script>
</apex:page>
1
  • 1
    +1 for the innovative lightning solution. fyi for the reader: you could only use Lightning components in a VF page using Lightning-Out.
    – Mahmood
    Commented Apr 28, 2017 at 15:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .