Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

How do I lock text fields in my forms?

Avatar

Level 2

I've got a form set up which includes text fields, image fields and buttons which "jump" users to other pages on the form.  The form behaves exactly how i want it to... ie is editable and has been populated with content by the client.  I now want to lock the text and image fields but preserve the functionability of the buttons, allowing other users to view, ideally copy and paste content, and navigate around the form without being able to edit it.

I thought i could do this by password protecting it in Acrobat, however this also disables the buttons.  Is there another way to do it?  I saw mention in another thread of being able to lock down the text fields but i don't understand how this is done.

Thanks for your help!

Michael

1 Accepted Solution

Avatar

Correct answer by
Level 2

Did you try?:

  • Click on the object that you want protected
  • Make sure that you can see the "Object" palette (by default in the lower right-hand corner of Designer design view)
  • There is a sub-tab in this palette called "Value"
  • In the Value tab, there is a "Type" dropdown box.
  • Select:  "Read Only" or "Calculated Read Only"

Hope that helps -

-Ben L.

View solution in original post

6 Replies

Avatar

Correct answer by
Level 2

Did you try?:

  • Click on the object that you want protected
  • Make sure that you can see the "Object" palette (by default in the lower right-hand corner of Designer design view)
  • There is a sub-tab in this palette called "Value"
  • In the Value tab, there is a "Type" dropdown box.
  • Select:  "Read Only" or "Calculated Read Only"

Hope that helps -

-Ben L.

Avatar

Level 2

I've tried Paul's example and have 2 problems:

1. When I copy and paste the "Lock all fields" button into my form, it doesn't seem to work.  

My form is also called "form1" and the script is the same as Paul's form (myScriptObject.LockAllFields(form1)), so i can't understand why it doesn't have the same effect.

2. This script seems to lock all content, including buttons.  Is there a way to only lock certain types of objects (ie just the text and image fields) and allow the buttons to continue to do their job?  There are hundreds of text and image files in many different subforms in the document, so calling them all out by name would be a real pain.

Avatar

Level 3

"Is there a way to only lock certain types of objects"

If you wrap the objects you want to lock into a subform, and use the name of the subform in the call to the scriptobject, instead of form1.

This will give you total control of which items are locked and which are not locked.

It works well.

Avatar

Level 2

So this is probably a stupid question, but how do i run this script without attaching it to a button?

Imagine i've created a form, filled it in, exported the data, and now want a locked version of the form to distribute which will let users see the data but not edit it.

Avatar

Level 1

I havent used Acrobat in over a year. Once upon a time I used text fields, but can't find them in latest Acrobat Pro. I used text boxes but they seem to have less attributes. How can I lock down the position of the text box on my .pdf but still make them typeable?