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.

Add an Instance automatically at the top of Next Page

Avatar

Level 1

Hello,

I am working on a dynamic fillable PDF form.

I want the user to add as many instances so to have the name (and other information) from all his directors.

I need the new instance to automatically go to the top of the Next Page.

How should I go about that?

Thank you in advance to any help/advice anyone can give

2 Replies

Avatar

Level 10

Hi,

this can be done with a contitional break.

Assuming you have table named "Table" with a header row named "Header" and a repeatable row named "Row".

Select the Row and add the following contitional break under the Pagination palette.

Language: FormCalc

If:

Row[-1].index ne $.index

Break: before

At: Top of next page

Leader: Header

Trailer: (none)

931121_pastedImage_0.png

Avatar

Level 6

I saw this and was curious to try your solution for future use.

I added a standard "Add" button with script:

Table._Row.addInstance(1);

- After the button is initially clicked, it adds a new row to the table.

- When clicked again, it adds an additional row (Row) to the table as well as a new Header row, the table appears on the 2nd page, and the first page is blank.

- When clicked a 3rd time, it adds an additional row to table (table is now on page 3), the first page is blank, and the second page has nothing but a header row.

Is this the correct/intended behavior?

table_screenshot.png