You need to sign in to do that
Don't have an account?
Alan Ashbaugh
How to change the default label from "--None--" when emitting a picklist?
I am using this Visualforce code to emit a pick list: <apex:inputField id="platform_input" value="{!caseObj.Platform__c}" required="true" />
My issue is that the first item in the list is: <option value="">--None--</option>
How can I change the label for that item to something else, like "Select a product".
Note: I would want to replace "--None--" in several other pick-lists as well with pick list specific messages such as "Select an issue", "Select a platform", etc.
Thanks!
My issue is that the first item in the list is: <option value="">--None--</option>
How can I change the label for that item to something else, like "Select a product".
Note: I would want to replace "--None--" in several other pick-lists as well with pick list specific messages such as "Select an issue", "Select a platform", etc.
Thanks!
You should use Schema method to do that.
Try the below link.
https://developer.salesforce.com/blogs/developer-relations/2008/12/using-the-metadata-api-to-retrieve-picklist-values.html
We were originally using a Schema, I believe. Here's what we had:
We changed to emiting the picklist automatically so we can use Translation Workbench for translating the picklist values. When we did the Schema, the value and the label were the same. The changes we made in translation workbench (such as translating a word to Spanish or German), was not output. Just the value was output.
Any thoughts?
Thanks,
Alan
It is a known issue, Kindly check the below kink.
https://success.salesforce.com/issues_view?id=a1p30000000SvOnAAK