[SalesForce] Remove User type picklist on lookup field in Visualforce

I imagine this isn't possible, but is there any way to remove or override the User type pick-list that shows up when User look-up field is associated with an apex:inputField? See screen cap:

User type pick-list

I'm asking because 1. a standard user will always be selected and 2. real-estate on this page is a little tight and I'd like to trim where possible.

Best Answer

Going through the attribute list for apex:inputField, I don't see anything that looks like it'll help.

Here's what I suggest: (if using Chrome) right-click and select Inspect Element over the User-type picklist, and see if there's a specific class attached to that element. Then using jQuery, in your .ready function, hide all elements of that class. Hopefully, the class name for user-type picklists is unique, so it won't bother any other part of the page.

Example: If the class name for user-type picklists = "userType", have the following jQuery

<apex:includeScript value="{!URLFOR($Resource.jQuery)}"/>
<script>
    var j$ = jQuery.noConflict();

    j$(document).ready(function(){
        j$('.userType').hide(); 
    });

</script>
Related Topic