Highlighted

Creating password protected text fields

Avatar

16-06-2008

Hello, I need to make a form that if a password is entered, all text fields are available to be filled out and if no password is entered, then only a few chosen text fields can be filled out. I have searched many places and have come close to the answer but have still fallen short of my goal.



thank you

Replies

Highlighted

Avatar

Avatar

_SekharN_

Avatar

_SekharN_

_SekharN_

17-06-2008

Here is one example to look at...



You can use this on a click of a button.

//JavaScript

var pWord = "AbCdEf" //set your password

var requestpWord = xfa.host.response("Please enter your password.")

if (pWord == requestpWord) {

this.presence = "hidden"; //hide this button

//write your code to enable all the text fields

}else {

//write your code to enable only fields tha you want.

}
Highlighted

Avatar

17-06-2008

Thank you so much.

It solved my problem, although when i open the document all the fields are still fillable because the document remembers my password. How can i make it so that each time i open the document it does not remember the password?



Thanks again