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

SOLVED

How Can I Password Protect An Image Field

Avatar

Level 3

Is there a trick that you know of to password protect an image field?

I have an image field, Only few directors allowed to use it.I want to restrict others from using it.

1 Accepted Solution

Avatar

Correct answer by
Level 10

I put a button beside the image field that teh user can click to activate it. On the Initialize event of the Image field set the access to "readOnly" (ImageField1.access = "readOnly". Then on the click event of the button use code like this:

var pswd = app.response("This image is protected by a password. \n Please enter a valid password.");

if  (pswd == "password"){

   ImageField1.access

= "";

} else

{

     app.alert("You entered an invalid password!")

}

Paul

View solution in original post

4 Replies

Avatar

Level 10

Hide and show based on the assigned user field . Do you think it won't work?

Nith

Avatar

Level 3

I don't like to use hide and unhide. I was thinking of adding a field called password. If someone clicks on the image field then I wanted the program to request a password. Or to make the image field protected or Read only unless a password was entered. The password I'll give it to them verbally.

Assume they must type PASS12345. Then when they type it will change the attribute on the image field. I know the concepte but not how to write it.

Avatar

Correct answer by
Level 10

I put a button beside the image field that teh user can click to activate it. On the Initialize event of the Image field set the access to "readOnly" (ImageField1.access = "readOnly". Then on the click event of the button use code like this:

var pswd = app.response("This image is protected by a password. \n Please enter a valid password.");

if  (pswd == "password"){

   ImageField1.access

= "";

} else

{

     app.alert("You entered an invalid password!")

}

Paul