Another Salesforce blog!!!

Salesforce, Apex

Remove –None– from Salesforce Picklist


<apex:page standardController="Lead">
    <apex:form>
        <script type='text/javascript' src= '//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js'>
        </script>
        <script language="javascript">
            $(function() {        
                $('select.RemoveNone option[value=]').remove();       
            });
        </script>    
        <apex:inputField styleClass="RemoveNone" value="{!Lead.LeadSource}"/>
    </apex:form>
</apex:page>

Leave a Reply

Your email address will not be published. Required fields are marked *

*