Tough problem, especially on the iPad. Mobile devices are tricky because the JS options are severely limited on the good viewers, and there are lots of really crappy PDF viewers that don't even recognize form fields, much less execute code. First, I'd suggest you use the Readdle PDF Expert or Adobe Mobile Reader on the iPad. Readdle is the best, it has much better submit and JavaScript functionality than any other App. Next, write the script on the regular Acrobat Pro on your desktop. if(1 == app.alert("increment?",2,1)) this.getField("Agreement").value = this.getField("Agreement").value + 1; Put this in a document script and test it out. If it works for you on the desktop, try it on the iPad with the two PDF viewers I've mentioned above. If it works, then you have something. However, you may find this technique problematic, but cause it's all on the client. There is no way to know if the number hasn't already been used, or if a number is skipped. This is especially true if there is more than one iPad doing the submit. A much better methodology is to use a "presubmit", to the server script that is doing the form processing, and have it search the DB and return an FDF with the correct next number. Only the Readdle Viewer can do this. Alternatively you can use a psuedo random number generator to create unique IDs. Then all these other issues go away.
... View more