Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

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


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.



1 Reply


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)



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

     ShowMe.rawValue = "Yes";



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.







     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";




     this.presence = "hidden";