Show TOC Start of Content Area

Procedure documentation Designing the Form Template Layout  Locate the document in its SAP Library structure

Use

When you design a composite form, you have to associate it with a specific form template from which form instances are generated at runtime. This example shows you how to model the layout of a form for distribution of social benefits.

Prerequisites

      You have created a form object and built its form context.

See: Creating the Composite Form

      You have basic knowledge about the Adobe LiveCycle Designer work environment.

Procedure

...

       1.      In the Logical Criteria step of the Create Composite Form wizard, make sure that Single Template is selected from the Associate dropdown box and choose Add Template.

       2.      In the Template File Name field, enter a name for the new template, such as distribution.

       3.      Choose Create Template.

The Adobe LiveCycle Designer opens in a separate window.

       4.      Open the Data View palette.

You can see the structure with all form context parameters that you added in the previous steps of the wizard.

       5.      Using drag and drop, place and align the following parameters on the body pages of the form:

       firstname

       lastname

       email

       telephone

They appear on the form as text fields labeled with their technical name. If you wish, you can change the text of the labels according to your specific needs.

       6.      Similarly, drag and drop the rest of the fields you need on the form. Provide additional text fields or labels for headings or directions, if necessary.

This is an example of how the form layout may look at the end:

       The Date field and a form title are placed at the top of the form.

       Under Personal Information, the most important employee’s details are listed, including Company, Department and Position.

       In the Social Benefits sections, the five available categories are listed. An additional field is provided that calculates the total units entered.

Note

To implement the calculation, use the scripting functionality provided by the tool. You can find more information about how to do this in the next step of the procedure.

       The Comments section and the Submit button are placed at the end of the document.

This graphic is explained in the accompanying text

       7.      Optional: You can write a script to calculate the total number of units entered for the different categories. To do this, follow the procedure:

                            a.      Initialize to “0” each of the five parameters, corresponding to the category fields.

Select the element from the body pages, select its initialize property from the Show dropdown box and enter the corresponding script statement.

This graphic is explained in the accompanying text

Caution

In script statements, you should use as variables the technical names of the parameters. Before you start writing, make sure you know the technical names of the fields you are referring to.

Syntax

medical = ”0”

education = ”0”

dependent = ”0”

unemployment = ”0”

pension = ”0”

                            b.      Select the Total field and enter the following calculation in its calculate property:

Syntax

total = medical + education + dependent + unemployment + pension

Each time the values in the fields are changed, the Total field is automatically updated.

       8.      To save and upload the template, choose Save.

       9.      To exit the Adobe LiveCycle Designer, choose Close.

   10.      In GP design time, choose Save to save changes to the form object.

Result

You have added a template to the composite form object. You can configure other aspects of the object or finish the wizard.

End of Content Area