Ed, use the below script on the click event on a button (in LiveCycle - Javascript) and it should do the trick. sorry it took a while to get back to you, very busy with work. Let me know if it works!
- Adam
function lockFields(oNode) {
if (oNode.className === "field" || oNode.className === "subform") {
if (oNode.access != "protected") {
oNode.access = "protected";
}
if (oNode.className === "field" && oNode.ui) {
if (oNode.ui.oneOfChild.className === "button") {
oNode.presence = "invisible";
}
}
}
for (var i = 0; i < oNode.nodes.length; i += 1) {
lockFields(oNode.nodes.item(i));
}
};
lockFields(xfa.form);