I have a date field in salesforce when i enter any value in date field i have to show the name field how can i achive it.Can anyone help on it

<apex:inputField value="{!ee.Date__c}" />
<apex:inputField value="{!ee.name}"/>

2 Answers 2

   <apex:outputpanel id="panel1">
     <apex:inputfield value="{ee.name}" rendered="{!NOT(ISNULL(ee.Date__c))}"/>

  <apex:outputpanel id="panel 2">
     <apex:inputfield value="{!ee.Date}"  >
       <apex:actionSupport event="onchange" rerender="panel1" />

note: your action support might have to call an apex action to set the value of ee.Date__c during the onchange event..


You can use JavaScript tricks as shown below:

  <apex:inputField value="{!Opportunity.Name}" onkeyup="document.getElementsByClassName('className')[0].style.display='block'" />
  <apex:inputField value="{!Opportunity.Name}" styleClass="className" style="display:none;"/>

You must log in to answer this question.

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