Controllably reversable access



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";


Accepted Solutions (0)

Answers (0)