- Mark as New
- Follow
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
Hi,
first, the preSave event occurs just before the PDF is saved, means if the save operation has not beed aborted by the user.
Details can be found in the XFA specs.
second, if you say you can determine which user group uses the form, then you can use my previous sample with an additional if expression.
function lockFields(vNode) {
if (vNode.className === "field") {
vNode.access = "protected";
}
for (var i = 0; i < vNode.nodes.length; i += 1) {
lockFields(vNode.nodes.item(i));
}
}
if (here goes your expression to determine user group 2) {
if (xfa.host.messageBox("Do you want to lock all the fields in the form?\n\nFurther changes aren't possible if you click 'Yes'!", "Lock form?", 2, 2) === 4) {
lockFields(xfa.form);
}}
Views
Replies
Total Likes