I want to include lookup Icon on my VF page. I tried doing custom lookup page but it is very time consuming and tedious job. So, I decided to use Contact;s AccountID field using inputField. I get total field with inputbox and lookup icon. I dont want input box. I just want lookup Icon to get Account ID and I want to select picklist value accordingly. Please help me to figure out this. Thanks in advance.

1 Answer 1


You can remove the input field from the page by using CSS that is qualified by the element name (i.e. hide the input.hideField but not the a.hideField as the styleClass is applied to both the field and the lookup icon):

<apex:page standardController="Contact">

input.hideField {
    display: none;

        <apex:inputField value="{!Contact.AccountId}" styleClass="hideField"/>


The input field remains in the DOM and is populated by the selection from the popup.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .