I have two fields.
- Lookup
- Preferences
Based on my Preferences I want my lookup to be visible and hidden. I am using jquery
j$(".class-name").hide()
to hide the lookup and j$(".class-name").show()
to show back.
Here is the condition on when the lookup should be seen and when not.
- In Preferences when the user selects only "XYZ" I want lookup to be hidden.
- In Preferences, when the user selects anything other than XYZ then I want to show the lookup again.
The problem here is it hides properly but when I try to show it an extra input box is shown in front of the lookup which I believe is coming from my show method. I tried using reRender but failed.
New to Salesforce and Coding. Any help will be appreciated.
<apex:inputField value="{!newReq.Site__c}" html-class="hideSite"/>
<apex:outputField value="{!projDetail.Job_Number__c}" />
function hideColumn(a)
` {`if(a.value != 'Materials')
` {` ` j$ = jQuery.noConflict();`j$(".hideSite").show();
j$(".hidePTN").show();
` }` ` else` ` {`j$ = jQuery.noConflict();
` j$(".hideSite").hide(); `j$(".hidePTN").hide();
}
` }`