I am using the "change" event script and it looks like this:
if (this.rawValue == "1") {
form1.MainPage.MTAIn.MTA-INFundingSubform.MTA-INFundingCheckSub.MTA-INIndSponsTF.mandatory = "error";
form1.MainPage.MTAIn.MTA-INFundingSubform.MTA-INFundingCheckSub.MTA-INIndSponsTF.presence = "visible";
}
else {
form1.MainPage.MTAIn.MTA-INFundingSubform.MTA-INFundingCheckSub.MTA-INIndSponsTF.mandatory = "disabled";
form1.MainPage.MTAIn.MTA-INFundingSubform.MTA-INFundingCheckSub.MTA-INIndSponsTF.presence = "hidden";
}
Is there something I am doing wrong? This script will not seem to change anything. The field stays hidden and optional.
I am saving this as a Dynamic pdf. Anyone have a solution?
Thanks
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
The objects .rawValue is not available yet when the change event fires.
I would move the script as is to the exit event. At that stage the new value is set and this.rawValue will work.
If you want to stay with the change event, you will need to test against xfa.event.newText:
if (xfa.event.newText == "1") {
// etc.
You are also using absolute references from the object with the script TO the NIndSponsTF object. It is likely that you don't need such a full reference and you should shorten it down to a relative reference.
Hope that helps,
Niall
Views
Replies
Total Likes
Hi,
The objects .rawValue is not available yet when the change event fires.
I would move the script as is to the exit event. At that stage the new value is set and this.rawValue will work.
If you want to stay with the change event, you will need to test against xfa.event.newText:
if (xfa.event.newText == "1") {
// etc.
You are also using absolute references from the object with the script TO the NIndSponsTF object. It is likely that you don't need such a full reference and you should shorten it down to a relative reference.
Hope that helps,
Niall
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies