You need to sign in to do that
Don't have an account?
Parteek Goyal 3
How to put value in custom picklist
Hi All,
I want to use custom picklist on vf page and i want to put five account name in this custom picklist. Is it possible?
Please help me...
I want to use custom picklist on vf page and i want to put five account name in this custom picklist. Is it possible?
Please help me...
Here is the code for static picklist values over vf page . You can use properties and actions over page and controller to work with it.
Here is the code for dynamically populating picklist values from controller.
All Answers
Custom picklist
Here is the code for static picklist values over vf page . You can use properties and actions over page and controller to work with it.
Here is the code for dynamically populating picklist values from controller.
Controller snippet :
Page snipppet:
This generates a select where the option's label and value are both the account name. When the user selects a value and submits the form, selectedAcc will contain the name of the account chosen. If you want the id of the selected account, simply change the SelectOption creation to:
and change the type of selectedAcc to Id.