


I am in the process of creating a form consisting of many fields as an in-processing form for my job. The issue is that every field needs to be required but when they are hidden they are still reading as required. How would I keep conditional logic and make only the fields that are not hidden required?
Views
Replies
Sign in to like this content
Total Likes
In the code that hides those fields, add TextField1.mandatory = "disabled";
Views
Replies
Total Likes
Steve,
How would that fit in here:
if ($.boundItem(xfa.event.newText) == "CIV" || $.boundItem(xfa.event.newText) == "MIL" || $.boundItem(xfa.event.newText)
this.resolveNode ("Government").presence = "visible";
this.resolve.Node("Contractor").presence= "invisible";
}
Views
Replies
Sign in to like this content
Total Likes
Hi,
Lets say you are making the field "Contractor" as inviisble. So you can append the code Contractor.mandatory = "disabled".
If you want more dynamic code you have to first check the visibilty of the field. If the field is vivible make it madatory and if the field is hidden make it optional.
Thanks,
Bibhu.
Views
Replies
Sign in to like this content
Total Likes
if ($.boundItem(xfa.event.newText) == "CIV" || $.boundItem(xfa.event.newText) == "MIL" || $.boundItem(xfa.event.newText)
this.resolveNode ("Government").presence = "visible";
this.resolve.Node("Contractor").presence= "invisible";
this.resolve.Node("Contractor").mandatory = "disabled";
}
Although I would think this would work:
if ($.boundItem(xfa.event.newText) == "CIV" || $.boundItem(xfa.event.newText) == "MIL" || $.boundItem(xfa.event.newText)
Government.presence = "visible";
Contractor.presence= "invisible";
Contractor.mandatory = "disabled";
}
Views
Replies
Total Likes