Expand my Community achievements bar.

Is there a way to have two fields hidden from the user but active for the person receiving the form?

Avatar

Level 7

I have an order form where there are two fields that the original form filler does not fill out. The person who finally receives and processes the completed form needs to fill in those two fields. I'm not sure how to handle this. Any help would be appreciated.

Thanks,

MDawn

1 Reply

Avatar

Level 10

My suggestion is a folder level script, that controls the visibility of form objects.

Only if this script is installed the fields will be visible.

You need three things for this.

1. The folder level script that has to be installed in the javascript folder of Acrobat or Reader:

var ShowMeAll = app.trustedFunction(function(doc)

     {

     app.beginPriv();

     var ShowMe = this.xfa.form.Form1.Master.ShowAllContent;

     ShowMe.rawValue = "Yes";

     app.endPriv();

});

2. A hidden textfield in the form (on the masterpage for example).

Let's say you name it "ShowAllContent".

Put this script into it's docReady:Event.

try

     {

     event.target.ShowMeAll(event.target);

     }

catch(e)

     {

     this.rawValue = "No";

     }

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

if (xfa.form.Form1.Master.ShowAllContent.rawValue == "Yes")

     {

     this.presence = "visible";

     }

else

     {

     this.presence = "hidden";

     }