Skip to Content

Manipulate (reference) fields in script for adobe forms

Lots of developer getting confused in manipulating one field value on another field. I also suffer from this when i started learning adobe forms and adobe script. so now i found something that auto reference the fields using below trick.

Also go through To insert object reference syntax automatically: Adobe Forms


Now lets say i’m having below hierarchy,


Now i want to write script to fill Sub2 = Sub1 + 10.

Step 1) Click on txtSub2.


Step 2) Then click in script editor event, where you want to write code to fill Sub2.


   Now press Ctrl key and drag mouse pointer on field in Design View, pointer icon will change to \/ icon. (v shape icon)


Step 3) Now when your mouse pointer is change, do mouse click, and reference of field will auto paste in script editor.


this way you can easily manipulate fileds in adobe forms.

Step 4). Now write below script,




Now, for Total i want Sub1 + Sub2,

Same as i expalined above,

     > select Sub1 or Sub2 (one by one),

     > click in script editor event,

     > press Ctrl key,

     > drag mouse pointer on respective field and

     > do mouse click

Your final script will be,


For Mass Total, (sub1 + sub2 + total)


Final Output,


We get what we want, this may confused you, drop your query below if any.

Hope this helps.

You must be Logged on to comment or reply to a post.
  • Nice and to the point! Just a minor point to a matter of good practice, when you are referencing another field on your form in script outside of your current field (ie."this"), it is good to do the following...

    this.rawValue = xfa.resolveNode(somefieldname.rawValue);

    xfa.resolveNode will always try to find the named node even if you do not give the exact/whole path. It makes it easier too when you have a very long path name to a long as your fieldname is unique, you can simply use that name and resolveNode will "find" it for you. It is similar to JQuery methods to locate an element in a DOM for you.

    But yes....nice, quick write up to the original post over in the forums!

    • Correct me if i'm wrong,

      first the syntax is, this.rawValue = xfa.resolveNode("somefieldname").rawValue;

      and trick i shown is gives you shortest possible path, so don't worry, whenever it feels it generate xfa.resolveNode syntax also (e.g. when your subform is untitled, when having array of same name control etc).

      Thanks for your input. 🙂

      Hope this helps.