Can we restrict user to select only one value from multiselect picklist in visualforce. If yes,please let me know the way.
Thanks.
Can we restrict user to select only one value from multiselect picklist in visualforce. If yes,please let me know the way.
Thanks.
Use a normal picklist.
Or use apex:selectList
and put the attribute size
on "1" (documentation)
You can use the 'multiselect' attribute on the apex:selectList component to control this behaviour, take a look at the documentation here.
A Boolean value that specifies whether users can select more than one option as a time from this selectList. If set to true, users can select more than one option at a time. If not specified, this value defaults to false. If multiselect is true, the value attribute must be of type String[] or a List of strings. Otherwise, it must be of type String.