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

Multi select pick list

Hi Folks,

                I wrote a code for multiselect picklist, now the problem is when i am selecting multiple values in picklist an submitting form if any other field value got error in page gets refreshed and validation error msg is  showing  and these multiselect picklist values getting unselected it should not happen like dat. can anyone suggest me to get out of dis.

here is the code




                        <td align="right">Select what describes your organization's
                        activity best :<br />
                        (Ctr + Click for multiple selection)<br />
                        (Command key on a Mac)</td>
                        <td valign="top"><apex:selectList styleclass="textboxreddrop"
                            size="4" multiselect="true" id="activity" value="{!activity}">
                            <apex:selectOptions value="{!SOption2s}" />
                        <td align="right" valign="top">Annual Operating Budget ($)</td>
                        <td valign="top"><apex:inputText styleclass="textboxred"





public List<SelectOption> getSOption2s()
        List<SelectOption> options = new List<SelectOption>();
        //options.add(new SelectOption('None','--None--'));        
        Schema.DescribeFieldResult fieldResult = ACT_Interest__c.ORG_CSI_Tags__c.getDescribe();
        List<Schema.PicklistEntry> ple = fieldResult.getPicklistValues();
        for(Schema.PicklistEntry p : ple)
        options.add(new SelectOption(p.getValue(), p.getValue()));        
        return options;




Thanks In Advance