Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Controllably reversable access

Level 2
Level 2

I'm trying to have the ability to lock down my document, but have authorized users unlock it at need. I've tried using a Password Field (which Adobe's documentation only laughably discusses at best). I can get it to set the entire form to readOnly when the correct password is put in. However, I tried to make it so that the password field itself would remain accessable, so that if someone should put in the unlock code, the document would unlock. That doesn't seem to work at all. I am using the code below on exit from the password field. I've tried the opening in a variety of ways, and none of them seem to work. I've also tried to add a line into the enter action so that when the field was clicked on, it would unlock. No such luck. Any suggestions?

if (this.resolveNode("$").rawValue == "12312312") {

  oTargetField = this.resolveNode("form1");

      oTargetField.access = "protected";

      this.access = "open";


else if (this.resolveNode("$").rawValue == "45645645") {

  oTargetField = this.resolveNode("form1");

      oTargetField.access = "open";

      //this.resolveNode("$") = "open";


0 Replies