Expand my Community achievements bar.

Lock Fields

Avatar

Level 2

How do you lock a field to prevent user data input and after form submission unlock it for data entry by a specific user?

7 Replies

Avatar

Former Community Member

Hi

Im not sure I fully understand but i think I would use the following example to prevent data entry

TextField1.access = "protected"

then to unlock have a checkbox which in turn on the change function have a popup box requesting the password.

then a simple if statement to say if password if correct TextField1.access = "open"

If i didn't understand correcly let me know.

There is probably other ways but this is the way I would probably do it.

Regards

Graham

Avatar

Level 2

Thanks, I will test and let you know.

Avatar

Former Community Member

paul is that possible to code it into the submission button (e.g. submit to email button, submit as:PDF)?

Avatar

Former Community Member

Hi

I am not sure  I understand.

Are you looking to lock fields prior to submission?

Thanks

Graham

Avatar

Former Community Member

i mean for example when clicking an email submission button can we assign it

to lock automatically the form fields?

Avatar

Former Community Member

Yes this is possible

I would suggest you create a fake email button by adding a standard button to your form and have this lock the fields then execute the email button.

e.g.

- make your current email button hidden

- Add a new standard button on top of your email button

- Have the standard button lock the form or specific form fields

- last line of code of the standard button will execute the click command of the hidden email button (e.g. form1.emailButton1.execEvent("click"))

That would be my way of doing it.

Hope this helps

Graham