Here is one way to speed up the development of interactive documents.

The purpose of this presentations is to demonstrate the ability to convert existing forms to LiveCycle format.
I modified the previous version taking into account the features of the forms of the National Bank of Canada.

The process consists of three stages:

1. Convert source files DOC, InDesign, PDF to plain text;
2. Creation of a list of fields based on the received text;
3. Generation of XDP file and its editing;
4. Testing the final document.

Stage 1 – Export

Consider the first step using the most complex version of the source document.
I received from the customer the source file of the InDesign format and AcroForm based on this file.
The main problems of the source file are:
All fields are created as separate text blocks
The order of the objects is not correct.

The only way to get the correct order of text objects is to use the coordinates of these objects. Here is the result of the first stage:

We can also export the fields of the old PDF form in the correct order, including the values of the drop-down lists:

Stage 2 – Addition

We put the text file in Excel and specify the type of each field. We can save the old field names using the list of fields obtained in the first stage from a static PDF. But we must consider the difference in the names of the AcroForm and XFA form fields. We also add the signs “required field” and “hidden field”.

A more complex version of the script allows you to take into account the purpose of the field: name, phone number, zip code, email address, etc. and group the fields into subforms.

Stage 3 – Polishing

XDP file generation and editing.

Please note that the text fields are of the correct length, the radio buttons and drop-down lists are filled. Also required and hidden fields have the necessary properties. The logo and other objects of the master page are also part of the document.

Now you need to group the fields into subforms and add the JavaScript code.

Stage 4 – Testing

Testing dynamic documents is a complex task requiring a complex solution. But it is possible. It is necessary to provide this possibility at the stage of designing a document.
Filling in the form fields takes into account the types of fields. For this purpose it is possible to use Excel.
You can see the corresponding demonstration by clicking on the link: Export from Excel to PDF