These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Setting permissions

Jake48001
Registered: Dec 15 2010
Posts: 15

I created a form with some help from the forum and everything is working great but now i want to be able to set permissions so that when i fill it out and email it to a customer they cannot edit it.

Jake Raich

My Product Information:
LiveCycle Designer, Windows
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
Hi,

you can use scripting to lock the fields.

  1. if(xfa.host.messageBox("Protect the form?", "Enable write protection",2,2)==4)
  2. {
  3. for (var i = 0; i < xfa.host.numPages; i++)
  4. {
  5. //Protect all form fields!
  6. var oFields = xfa.layout.pageContent(i, "field");
  7. var nNodesLength = oFields.length;
  8. for (var nNodeCount = 0; nNodeCount < nNodesLength; nNodeCount++)
  9. {
  10. oFields.item(nNodeCount).access = "protected";
  11. }
  12. }
  13. }

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs

Jake48001
Registered: Dec 15 2010
Posts: 15
way to advanced for me. is there not a simple way to do it?

Jake Raich

radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
A simpler method is to print the forms to a PDF-file.
This definitely will flatten the form, but you also will lose all interactivity of the forms.

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs

George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
Radzmar,

What exactly do you do to get your code formatted like that? I've been unsuccessful in the past.


Sorry for the highjack Jake.
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
@George

There is a list of supported HTML tags you can use in your posts to highlight codes and other things.
But it's like to be gold dust to find that list.

Allowed HTML tags for AUC forums

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs