Answered
This topic has been closed for replies.
You can add the following line after the one that's similar:
getField("private").display = readonly ? display.hidden : display.visible;
Sign up
Already have an account? Login
To post, reply, or follow discussions, please sign in with your Adobe ID.
Sign inSign in to Adobe Community
No account yet? Create an account
To post, reply, or follow discussions, please sign in with your Adobe ID.
Sign inEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.

Zac B., Cypress CA
(function () {
// Get one of the fields in the group var f = getField("private.name");
// Determine new readonly state, which // is the opposite of the current state var readonly = !f.readonly;
var readonly_desc = readonly ? "deactivate" : "activate";
// Ask user for password var resp = app.response({ cQuestion: "To " + readonly_desc + " the fields, enter the password:", cTitle: "Enter password", bPassword: true, cLabel: "Password" });
switch (resp) {
case "your_password": // Your password goes here getField("private").readonly = readonly; app.alert("The fields are now " + readonly_desc + "d.", 3); break;
case null : // User pressed Cancel button break;
default : // Incorrect password app.alert("Incorrect password.", 1); break;}
})();