This article discusses some of the best practices for creating LiveCycle forms using LiveCycle Designer. It does not apply to a particular version of LiveCycle Designer and should not be considered as a step-by-step guide for creating forms, but it represents general practices to improve and standardize processes. Before implementing these best practices, ensure that they fit in your overall strategy for designing forms and align with your organizational needs.
Defining best practices and molding them into processes is an ongoing activity as individuals and teams gain experience with creating forms.
An important aspect of any LiveCycle form is its design and layout. It defines how convenient or difficult users find to interact with the form. Ideally, a form should be readable, uncluttered, logically laid out, and easy to use.
Consider the following practices when designing the form layout:
- Keep the design simple.
- Minimize the number of fields. You can also consider adding captions and numbering the fields in complex forms.
- Use the right type of numeric, text, and date fields to facilitate easier data entry.
- Do not use animations unless absolutely required.
- Use fonts that are readable and rendered by all devices as intended.
- Choose fonts that allow Acrobat to extract characters to Unicode text for reading by a screen reader or for saving text for a braille printer.
- Use appropriate white spaces to depict the logical flow of the form.
- Use page sets to control the order and visibility of pages in the form design.
- Use the tabbing order to allow moving from one field to another.
- Consider using a template instead of designing from scratch to ensure consistency.
- Use style catalogs to edit and apply styles to objects in a form design. It ensures consistent formatting within a single form or across multiple forms.
Another important aspect of standardizing processes while creating forms is to follow a naming convention. If you are using Script Object Model (SOM) expressions to reference objects, it becomes all the more important to follow simple and standardized naming conventions.
Naming conventions are usually specific to one's organization, and therefore should be defined keeping the requirements in mind before the development of forms begins.
The following best practices can help you set standards for naming conventions:
- Be aware of the form design objects and variable names in your form.
- Use descriptive names for objects, instead of the default names, to define the functionality or the usage of the object.
- Avoid using the names of the XML Form Object Model properties, methods, and objects for form design objects and variables.
- Choose field‐naming conventions that differ from the XML Form Object Model naming conventions to avoid naming conflicts.
- Use different names for each object on the form to avoid naming conflict.
- Keep the object name short if a 2D barcode is being used to avoid the running text into the barcode.
To accelerate the creation of forms while minimizing the effort, you should consider creating templates and reusable form components. These templates and reusable components can be a good starting point for quickly creating new forms and sharing components between multiple forms. It allows for a seamless and scalable forms maturity model within an enterprise. In addition, it helps in standardizing forms across the organization.
The following lists some of the best practices on reusing components:
- Use form templates, wherever possible, instead of creating from scratch.
- Use the Import Document feature of Designer to import forms into Designer from other form authoring tools, such as Acrobat, Microsoft Word, or Microsoft Excel.
- Use Object Library and Fragment Library palettes more often to use existing objects and fragments in your form.
- Use fragments to speed up the creation and maintenance of large number of forms. Fragments are reusable sections, such as an address block or a logo, which you can store in a reusable object library. An object library can contain a single field, a group of fields, a page, or just a piece of script.
Designer scripts and calculations can extend and enhance the functionalities of the forms to provide a rich user experience. Although most of the enhancements can be made using various features in Designer, some Form Developers are more comfortable using scripting.
Here're some best practices when using scripting in Designer:
- Avoid duplicate Universally Unique Identifier (UUID) for improved performance. Duplicate UUIDs are usually created when you copy an XDP from one form to another.
- Use resolveNode() and resolveNodes() methods judiciously to resolve nodes and retrieve the desired information. It can become a performance overhead if not used properly. Consider using SOM expressions to return multiple nodes.
Tip: Press CTRL and click an object to view its SOM expression.
- Select Tools > Action Builder to quickly build common interactive capabilities in forms that have a flowable layout, without writing scripts. You can always look at the script and modify it later.
- Test the script by using the Preview PDF tab or in your test environment.
Accessibility is an important factor to consider when designing XFA-based forms. Conforming to the accessibility standards ensures that your form is enhanced for users with disabilities. The Accessibility palette in Designer allows you to enhance the usability of forms for users with disabilities using LiveCycle forms and tagged forms.
All the points discussed in this article contribute to creating accessible forms. In addition:
- Include tool tips in your form as most screen readers are capable of reading tool tips.
- Created forms that accept inputs from both a keyboard and a mouse.
- Avoid using colored background.
- Avoid using radio buttons if you can use a list box as browsers and screen readers treat radio buttons inconsistently.
- Do not use complex tables.
- Implement the reading and tab orders properly. It ensures that assistive devices navigate the form in a specific sequence.
- Use standard objects from the Object Library palette as much as possible to avoid additional efforts on defining accessibility properties.
- Add alternative text to images as screen readers can read alternative text.
- Ensure that the Accessibility tags are set under Form Properties/Save Options so that Acrobat recognizes them.
- Use labels and captions for form controls
- Test your forms for accessibility before distributing them.
We have discussed, in brief, the best practices for designing LiveCycle forms. For more details, visit the links in the Suggested readings section throughout the article.
In addition, the documentation and reference material for LiveCycle Designer 10 is available at LiveCycle ES3 Documentation page.
Although the documentation should answer most of your questions, feel free to initiate and participate in discussions.