My form has a set of buttons(tabs) on click of which subform relating to those tabs are shown/hidden depending on the selection.
The requirement is such that i have a lock button on click of which i lock all my fields in all tabs and once clicked, fields are to be locked and the lock button has to hide. Done! this one is ok!.
But i have placed this lock button in the master page so that the button is available for the user when he is navigating across tabs.
Say i have 3 tabs. When i am on tab1, i click lock button and lock all fields across tabs and my lock button disappears according to the requirement.
Now, When i move to the tab2/3, i still see that lock button being there in the same position! And when im back on tab1 lock button is shown again!
Can someone tell me why this is happening??
Below is the js i have written on click event of the lock button
var lock = xfa.host.messageBox("You are attempting to lock the form. You will not be able to edit once locked. Do you want to proceed?", "", 2,2);
if(lock == 4)
NavigationMenuFrm.Tab1Content.access = "protected";
NavigationMenuFrm.Tab2Content.access = "protected";
NavigationMenuFrm.Tab3Content.access = "protected";
xfa.resolveNode("form1.#pageSet.Page1.LockButton").presence = "hidden";
xfa.resolveNode("form1.#pageSet.Page1.Lock Image").presence = "visible"; //displaying a lock icon
Someone Please Suggest!