This is the script i have in the Change event of a checkbox:
if (xfa.resolveNode("this").rawValue == "1" && SSN.isNull)
{
SSN.mandatory = "error";
app.alert("Please fill in the Dependent SSN portion of this form.");
}
else
{
SSN.mandatory = "disabled";
}
I also need this to verify that the "age" field is >= 1, if not return a message.
Views
Replies
Total Likes
Hi,
If you are using the change event, you need to bear in mind that the event fires BEFORE the user's input has registered in the object's .rawValue.
Either use xfa.event.newText instead of this.rawValue OR move the script to the clcik event (where this.rawValue is appropriate).
I haven't checked the script - too late,
Niall
Views
Replies
Total Likes
This script does what i want, i just need to add the verify "age" field thing.
Views
Replies
Total Likes
Hi,
I am surprised you are getting the script to work where you are using .rawValue in the change event.
In any case, if you can to test the age field, then you have a couple of choices.
Hope that helps,
Niall
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies