AEM Forms Forum

Q: What are the JavaScript issues involved with HTML forms

We have many XDPs that previously we used as interactive PDF forms. But now, we need to render them as HTML forms. Will the JavaScript work. What scripts will work and what should I watch out for.

lien.vu@hennepin.us, 2022-04-07 14:36:59

jp@smartdoctech.comcommented:April 07th, 2022

Hi Lien, The HTML Forms with Designer course shows what JavaScript will work in HTML forms and what JavaScript will not work. I put a link to the course below.
In particular, pages 14 - 16 refer to Acrobat Script. Because it is Acrobat Script that uses Acrobat menu items, it will not work in the browser. Since the host application for HTML forms is the browser, you can no longer use features that are associated with Acrobat. This means you can’t use dialog boxes that are specific to Acrobat and you can’t use menu items that are specific to Acrobat. You also cannot call the app.execMenuItem() method as shown here because the browser will not have the same menu items as Acrobat. Acrobat JavaScript is based on the core of JavaScript version 1.5. So, the core classes of JavaScript like the Math, String, Date, Array, and RegExp classes will work fine on both PDF and HTML forms. However, the extensions that Adobe has added to Acrobat JavaScript will likely be problematic. For instance, Adobe has added JavaScript objects that implement ADBC (Adobe DataBase Connectivity). Any scripts that use these objects should either be eliminated or reworked so they are successful in HTML forms.

Reply

Attach a screenshot or PDF file (optional)


Welcome...

The AEM Forms Forum is designed to help you post questions about AEM Forms and benefit from the questions and answers posted by your colleagues. You can access detailed documentation and courseware about the topics in your question with your SmartDoc Subscription.

Designer