Copy link to clipboard
Copied
For the last 2 years we are acreating interactive and long form for customers. For many reasons, these are not online and we provide them only in PDF with custom Javascript. We have added buttons such as "Attach file", custom Word counters for long fields and such.
However, in the last 18 months we had customers saying the buttons and all interactive forms don't work. After some investigation, it turns out the IT department has turned off Javascript by default on all supplied Laptop and Desktop computers. These clients are also not technical savy and explaining to turn off Javascript is not an option.
So my question is: Is using Javascript in PDF forms still good practice in 2022 and beyond? We are considering to only use inbuilt form functionality and ditch Javascript all together.
Copy link to clipboard
Copied
Without JS the forms in PDF files are extremely limited. There's no real good reason to disable it, though. The security risks it poses are extremely minimal. I would ask your IT people to re-consider this approach.
A much bigger issue is that people now use browser plugins or other non-Adobe software to open PDF files (or even on mobile devices), where support for scripts is minimal at best, and usually non-existent.
Copy link to clipboard
Copied
JavaScripts in HTML pages are most dangerous than in PDF files, so the choice of your IT does not seem very rational.
Copy link to clipboard
Copied
It is possible that your customers may be opening this PDF in web browsers or other viewers, in which case, the PDF may not render appropriately, respect any security restrictions, and will not execute the intended JavaScript code embeded in your form(s).
If that is the case, you may need to encourage the users to open the PDFs in Adobe Acrobat Reader DC.
Copy link to clipboard
Copied
I probably should have added, its the Government sector. The laptops have USB sticks disabled. Sites to file sharing such as dropbox or google drive are disabled. Most of our clients work in Government and had issues with Javascript being disabled in Acrobat by their IT department (various Universities).
Another issue we came across is while Javascript was enabled, "Enable menu items Javascript execution privilages" was switched off. So our "Attach file" button did not work - while the rest was was working.
Is Javascript enabled by a default Acrobat installation on a Machine?
Copy link to clipboard
Copied
> Is Javascript enabled by a default Acrobat installation on a Machine?
Yes.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now