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

Hidden subform that's viewable to only certain people

rlrussell
Registered: Nov 3 2010
Posts: 3

Hi there-
 
I'm new to the community and relatively new to Acrobat Forms/Live Cycle.
 
Wondering if someone may have the answer to this issue:
 
We have a job description PDF form that can be filled out by various people within our organization. When they are done, they submit by email. We've decided we'd like to hide a subform from those who fill it out, but show it to the person who receives it (and possibly others).
 
PROCESS:
- Individual opens PDF form and fills in all fields
- Individual submits by email to person in HR
- HR person receives the PDF and opens it, somehow revealing the hidden subform
 
What is the correct way to do this? Hidden with password? Or is this only accomplished if the receiver has Acrobat Pro/Live Cycle?
 
Thank you in advance for your help.

My Product Information:
LiveCycle Designer, Windows
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
You possibly can do this in certain ways.

You could install a folder level script onto the computers of the HR persons.
Only if this script is installed the subform will be visible.
You need three things for this.

1. The folder level script:
  1. var ShowMeAll = app.trustedFunction(function(doc)
  2. {
  3. app.beginPriv();
  4. var ShowMe = this.xfa.form.Form1.Master.ShowAllContent;
  5. ShowMe.rawValue = "Yes";
  6. app.endPriv();
  7. });

2. A hidden textfield in the form (possibly on the masterpage).
Let's say you name it "ShowAllContent".
Put this script into it's docReady:Event.
  1. try
  2. {
  3. event.target.ShowMeAll(event.target);
  4. }
  5. catch(e)
  6. {
  7. this.rawValue = "No";
  8. }

3. A script in the layoutReady:event of the subforms or form fields you like to show/hide depending on the folder level script.

  1. if (xfa.form.Form1.Master.ShowAllContent.rawValue == "Yes")
  2. {
  3. this.presence = "visible";
  4. }
  5. else
  6. {
  7. this.presence = "hidden";
  8. }

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs