This article lists some of the best practices for enabling a form template for HTML5 renditions. By following these guidelines, form developers can ensure that the behavior and appearance of HTML5 forms and XFA-based PDF is consistent.


  1. In new forms, add the non-interactive (Draw) elements before the interactive (Fields) elements. Add the elements in Hierarchy (Dom Order) if there is an overlap between them. Similarly, between overlapping Draw Text and other Draw elements (like Rectangle, Circle), put in Text after Rectangle so that it is visible. Avoid any overlap between Draw and Field.

  2. HTML5 rendition of Form Template does not embed any fonts. Avoid using fonts that you do not expect on your client computers or you risk a not so optimum rendition on the client devices.

  3. For Repeatable Subforms, mark the initial count as 1 or more. If you require zero initial instances, remove or hide the initial instance in form ready or initialize the script based on data.

  4. If you are targeting the same form for both PDF and HTML, make sure that you protect the Acrobat-specific JavaScript by checking the environment type. Also ensure that you write equivalent scripts for the browser environment.

  5. If you have a hidden subform with a complex hierarchy that is split across pages, make the form visible at design time. Hide the form in the initialize script based on your logic.


HTML5 forms contain a client-side XFA scripting library that supports form logic execution in both the scripting languages that the Adobe XFA Implementation supports: JavaScript and FormCalc.  This library includes implementation for most of the commonly used APIs on the client side. The list of supported APIs and Events can be found here.  If you need APIs that are not implemented yet, you can mark your script to run at server. HTML5 forms also support Web Service invocation from the client. The service runs on the server.

HTML5 forms and PDF forms support different set of features. For the complete list of features, see Feature differentiation between HTML5 forms and PDF Forms.

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy