anusha(salesforce developer)

Friday 8 July 2016

Enable the TextBox when other textbox gets popultated

Enable the TextBox when other textbox gets popultated

Hi Guys,

I want to share one of my requirement where I have to enable the textbox when other text box gets filled/Populated.

Please find the below code hope this will help you .

<apex:page controller="PopulateTextString" >
<apex:form >
<apex:pageBlock >
            <apex:pageBlocksection columns="2">
                    <apex:inputText value="{!inputValue1}" id="theTextInput1" label="Input 1" tabindex="1">
                    <apex:actionsupport reRender="refresh" event="onkeyup"  />
                    </apex:inputText>
                    <apex:outputPanel id="refresh">
                                        <apex:pageblocksection rendered="{!LEN(inputValue1)>0}">
                                        <apex:inputText value="{!inputValue2}" id="theTextInput2" label="Input 2" rendered="true" tabindex="2"/>
                                        </apex:pageblocksection>
                            </apex:outputPanel>        
                 
                 
                             
            </apex:pageBlocksection>
         
                 
</apex:pageBlock>
</apex:form>
</apex:page>

/* Controller */

public class PopulateTextString
{
    public String fisrttext{get;set;}
      public String inputValue1{get;set;}
public String inputValue2{get;set;}

}

No comments:

Post a Comment