Dynamic forms are composite forms that allow you to present varying amounts of data to users. These forms change their layout according to the data they receive from the prefilling services at the time of rendering, so each separate request for form generation produces a form with a different length or content. For example, you may need to display all purchase order records from a repository. Since the order count is variable, you can accommodate it using a dynamic form.
In addition, you can change the layout of dynamic forms at runtime using the script functionality embedded in the form template. For example, you can add or remove rows from a table using the controls provided.
You have basic knowledge of how to create composite forms.
For more information, see Creating and Configuring Forms .
The following procedure describes the basic steps for creating dynamic forms. For more information about the process of form creation and configuration, see the Adobe LiveCycle Designer's online help under Working with Form Designs → Creating forms with a dynamic layout.
For more information, see Creating Form Objects in the GP Design Time .
To be able to preview and test your dynamic form in the Adobe LiveCycle Designer environment, you need to navigate to File → Form Properties… and on the Defaults tab page select:
You design the layout of the form by inserting relevant form elements into the body pages of the document.
Field-Based Dynamic Form | Schema-Based Dynamic Form |
---|---|
Insert non-repeatable form fields | |
You create all the relevant fields on the form by dragging and dropping them from the Library palette onto the form's body page. Since you do not have a previously defined data schema, you should manually create and configure the form elements you need. |
You create all the relevant fields on the form by dragging and dropping them from the Data View palette onto the form's body page. The Data View palette holds a Data Connection with the structure of the form context that you have built previously. For more information, see Building and Using a Form Context . |
Insert dynamic
form fields
Dynamic elements that have to appear repeatedly, depending on the occurrences of the data structure or attribute they are bound to, must be placed in tables and subforms. |
|
Tip
|
|
From the Library palette, drag and drop elements into the cells of the table. |
From the Data View palette, drag and drop attributes and structures into the cells of the table. Mapping is performed automatically. |
In the Hierarchy
palette, select the row that contains the dynamic input.
On the Object → Binding tab, set the Repeat Row for
Each Data Item indicator to specify that the row should
replicate for each new data record. You may also specify a minimum and maximum number of occurrences. |
|
Make sure that the names of the fields, and of the row itself, match the corresponding data attributes and structures from the form context. For example, if an instance of the structure purchase_orders is used to fill in a row in a table, you must name this row purchase_orders as well. |
|
|
If you want to insert background objects, or objects that need to appear on every page of the form (such as current date, current page, logos, watermarks, headers and footers), you should modify the master page.
If you have designed a field-based form template, you need to define mappings between the template fields and the form context.
More information: Adding Content to Field-Based Templates
Each table or subform that corresponds to a dynamic (repeatable) data structure is presented as a list, that is, at the time of rendering it appears as many times as there are instances of the particular structure.
For more information about configuration options, see Configuring Form's Use and Data Processing Options .
The following example illustrates the basic layout of a dynamic composite form that is to be filled with purchase order records from a repository.