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
Ankita Gupta 26Ankita Gupta 26 

Display multipicklist using HTML tags in VF page

I need to display multipicklist using HTML tags in VF page(standard controller on Account) Multipicklist should show some list of contacts belonging to that account.
I already have a big VF page where I want to replace apex:selectlist with html select tag because apex:selectList is not mobile compatible.

How can we implement it.Please advise.
Ajay K DubediAjay K Dubedi
Hi Ankita,
Please try below code and let me know if this works for you. If still need any modifications do let me know.
<apex:page standardController="account" recordSetVar="ac">
    <apex:outputText></apex:outputText>
    <apex:form >
        <apex:repeat value="{!ac}" var="a">
            AccountName:{!a.Name}
            <p style="padding-left: 50px;"> <select onchange="setValue(this.value)">
                <apex:repeat value="{!a.contacts}" var="c">
                    <option value="{!c.Id}">{!c.LastName}</option>
                </apex:repeat>
                </select>
   </p><br />
        </apex:repeat>
       
    </apex:form>
</apex:page>

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks,
Ajay Dubedi