Acrobat mobile supports the Acroforms interactive form format authored with Acrobat Pro. It does not support the XFA interactive forms format created with LiveCycle Designer.
Adding JS via Acrobat¶
The following provides some general instructions for adding JS to PDF forms in Acrobat.
Open Acrobat and do either:
Open an existing form and choose Tools > Edit.
Choose Tools > Create and create a form from an existing file.
You need to be in edit mode to continue.
Add a new form element from the top bar or select an existing element.
Right click on a form element.
Choose the Actions tab.
Choose OK and close the forms dialog.
Tips and tricks¶
Use intuitive names¶
To simplify and speed coding, it’s always a good idea to give you fields intuitive names. Set the name of the form fields on the General tab.
Interacting with multiple fields¶
There are several options for working with multiple fields.
Provide a comma-separated list of field names:
this.getField("Text1").value = "AAA"; this.getField("Text2").value = "BBB"; this.getField("Text3").value = "CCC"; this.getField("Text4").value = "DDD";
Loop through an array of field names:
var fields = new Array(); fields = "Text1"; fields = "Text2"; fields = "Text3"; this.resetForm(fields);
In Acrobat, set up forms submission via the Submit a Form Action. It provides URL options (e.g. mailto) as well as format and export settings.