I have a VF page that contains 2 text fields. What I am trying to do is populate Field2 with the value from Field1 when Field1 is entered, but do so in real time (i.e., using actionRegion & actionSupport). I do have a custom controller on the page. Can anyone help with how to do this? Thanks.
VF Page Controller:
public with sharing class VF_Controller_CancelCreateCampaign{
public string Budget_Name__c {get; set;}
public string Use_Budget__c {get; set;}
public Campaign_Create_Request__c CCR;
public VF_Controller_CancelCreateCampaign(ApexPages.StandardController myController){
this.CCR = (Campaign_Create_Request__c)myController.getRecord();
}
public PageReference saveInit() {
try{
update CCR;
}
catch(DmlException ex){
ApexPages.addMessages(ex);
}
PageReference tempPage = new PageReference('/apex/VF_CampaignCreate_View?id=' + CCR.Id);
tempPage.setRedirect(true);
return tempPage ;
}
public PageReference delInit() {
delete CCR;
PageReference tempPage = new PageReference('/' + CCR.Opportunity__r.Id);
tempPage.setRedirect(true);
return tempPage ;
}
public void BudgetName(){
CCR.Use_Budget__c = CCR.Budget_Name__c;
}
}