I have form with many items that I would like them to hide if they are not selected, before printing for example or just to clear them off.
Hi,
If all your checkboxes are under the same subform (called Subform1 in this case) you can use a script like the following in the prePrint event.
var checkboxes = Subform1.resolveNodes('#field.[ui.oneOfChild.className == "checkButton" and $ == 0]');
for (var i = 0; i < checkboxes.length; i++)
{
checkboxes.item(i).presence = "hidden";
}
and then make them visible in the postPrint event;
var checkboxes = Subform1.resolveNodes('#field.[ui.oneOfChild.className == "checkButton" and $ == 0]');
for (var i = 0; i < checkboxes.length; i++)
{
checkboxes.item(i).presence = "visible";
}
Regards
Bruce
I will for sure try it thanks!
Views
Replies
Total Likes
Hello,
I tried this script on the check boxes that I wanted the action to apply; keeping in mind your suggestion for the prePrint event
if (this.rawValue == "0") {
this.resolveNode("$").presence = "hidden";
}
And for the postPrint
if (this.rawValue == "0") {
this.resolveNode("$").presence = "visible";
}
Thanks a lot for your suggestion and idea.
Views
Replies
Total Likes