JavaScript for Mobile Devices
Copy link to clipboard
Copied
All,
Thanks to all of the quality posts on this site I have been able to create a couple of JavaScripts on a form that do exactly what I need them to, but only seem to work in the desktop environment. One example is where a "check box" when selected also selects other checkboxes in the form and deselects them when it is unchecked. Here is one example:
if(event.target.isBoxChecked(0))
{// Perform actions when checked
this.getField("Box 56").checkThisBox(0,true);
this.getField("Box 57").checkThisBox(0,true);
this.getField("Box 58").checkThisBox(0,true);
this.getField("Box 59").checkThisBox(0,true);
}
else
{// Perform actions when unchecked
this.getField("Acquisition").checkThisBox(0,false);
this.getField("Box 56").checkThisBox(0,false);
this.getField("Box 57").checkThisBox(0,false);
this.getField("Box 58").checkThisBox(0,false);
this.getField("Box 59").checkThisBox(0,false);
}
Is this simply a JavaScript format that mobile devices don't recognize? Is there an environment that I should be aware of that would allow me to test scripts for several platforms prior to completion of a form? Yes clearly I am not educated in JavaScript I have merely researched the forum for suggestions made in other posts and then tweaked what I found to meet my simple expectations.
Thank you in advance for any information your expertice may be willing and have the time to share.
Copy link to clipboard
Copied
The JavaScript API for Acrobat on mobile is severely limited compared to the desktop version. If you want your forms to behave consistently across all platforms, limit your use of the APIs to the ones available on mobile. You can find that list here.

