Drop down selection triggers predefined text in text box
Good morning all , i was hoping to get tome guidance on this .
I am creating a form that when a drop down selection is made it will trigger a predefined response in anouther text that pulles its information from other form fields .
My dropdown is "DD_Income_change" and the text box is "Calc_Text"
My other fields of information are "StartRent", "EndRent", "Date36_af_date", and "MonthlyIncome"
I have come up with the following DD Valadation Script and was hoping someone could review it and see where i went wrong.
"var s = this.getField("StartRent").valueAsString;
var e = this.getField("EndRent").valueAsString;
var d = this.getField("Date36_af_date").valueAsString;
var i = this.getField("MonthlyIncome").valueAsString;
var r = this.getField("Calc_Text ").value;
if(event.value == "Income Increased/Decreased")
r.value = " Effective "+ d +", your potion of rent will be changing from $"+ s +" to $"+ e +". Please pay the amount of $" + e + " on the 1st of the month." +
"This adjustment is due to your monthly reported income of $"+ i +".";
else if(event.value == "No Change")
r.value = " Due to your monthly reported income of $”+ I + “, your monthly rent will not be changing. Please pay the amount of $”+ e +” on the 1st of the month.”;
else r.value = ""; "
Thank you for your time .
