Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Mulitple page form

Avatar

Former Community Member

Hi all,

I am relatively new creating forms using LiveCycle.  I am using version 8.2.1

I want to create a 3-page form.  First page being white, 2nd page being yellow, and third page being blue.  This will replace forms that we are ordering that are carbonless copies. 

I want to be able to allow the user to populate a field and it automatically populate the other pages as the information is placed on the first page.

Is this possible?

I already have the first page created...

kevin

9 Replies

Avatar

Level 10

Hi,

There are a couple of options.

First you could use the blobal binding property for all of the fields. Make sure that each of the objects on page1 have unique names in the hierarchy. Then select each field and in the Object > Binding palette set the binding to "global". Now insert two pages and select the contents of page1 in the hierarchy and copy. Then select the new pages in turn and paste. At runtime any inputted values in the fields will automatically update the corresponding field on the other pages.

Another option would be to stick with a 1-page form and change the colour a rectangle on the Master Page during the printing operations. Something like a white rectangle on the Master Page, then you would have a print button that would print the first page, then change the colour of the rectangle to yellow and print again, then change the colour to blue and print again.

Hope that helps,

Niall

Avatar

Former Community Member

Hi Kevin,

This can be accomplished several ways including global data binding and explicit object reference. The attached form uses global data binding for 'firstName'.

On 'lastName' there is script attached to the exit event on page 1 that explicitly populates lastName on pages 2 and 3.

// form1.page1.subform1.lastName::exit - (JavaScript, client)

if (!(this.rawValue == "" || this.isNull)) {

          form1.page2.subform1.lastName.rawValue = this.rawValue;

          form1.page3.subform1.lastName.rawValue = this.rawValue;

}

The choice of methods depends upon your requirements.

Steve

Avatar

Former Community Member

Thanks All,

Once I went in and set each field to global, it works flawlessly!

Sonce I am bugging you, two more questions:

1. How do I set the background color of the two sub forms

2. is there a way to take a column in a table and do a sum function like I can in excel

Example SUM=Amt1,Amt12

Avatar

Level 10

Hi,

If you select the subform you can set the background colour using the Border palette.

Designer supports two scripting languages: JavaScript and FormCalc. For this summing functionality I would recommend FormCalc.

Make sure that the rows have the same name: eg Row1. In the hierarchy you will then see the various instances of the row: eg Row1[0], Row1[1]..., Row[n]. The row containing the Total field should have a different name.

Again set the field that you want to sum to the same name in each row: eg Amt.

Then in the calculate event of the Total field have the following FormCalc script:

$ = Sum(Row1[*].Amt)

This uses the wildcard (*) and will sum the Amt in all instances of Row1 in the table.

There are some table examples here: http://assure.ly/lwQHm7. Also the SOM expression example has a table and shows the difference between JavaScript and FormCalc: http://assure.ly/kUP02y.

Hope that helps,

Niall

Avatar

Level 10

You can use FomCalc for calculation formula similar to Excel.

In the calculate event of the Sum field the FormCalc script can look like:

or

More about FormCalc can be found here: http://help.adobe.com/en_US/enterpriseplatform/10.0/DesignerFormCalcRef/index.html

Avatar

Former Community Member

I was able to change the background color with no issues...Thanks

I am, however, puzzled by the Formcalc information.

I have a three column table with 12 rows.  The last column is where the amounts will be listed.  Each of the twelve fields are named Amt1-Amt12.  I clicked on Amt1but was unable to find the calculate event...

Where am i missing it?

Avatar

Level 10

Hi,

If you are referencing each of the Amt fields individually, you would also need to include the row name. For example:

$ = Sum(Row1.Amt1, Row2.Amt2, Row3.Amt3)

You get the idea.

Here is an example where the rows AND the amount fields have the same name: https://acrobat.com/#d=n3Sz69m8cUsiCFGU6UqQLA.

Hope that helps,

Niall

Avatar

Level 10

Hi,

It is published so should be available. In any case, try this link: http://assure.ly/o61hpQ.

Niall