Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

Multiple Master pages in a form

Avatar

Level 1

Hi All,

I am developing a 10 paged form in adobe LiveCycle Designer. I need the first page to have the page number as 1of 1, Second to 6th page to have numbers 1of 5, 2 of 5...5 of 5,Seventh page to have no number and the last three pages to have numbers 1of 3, 2 of 3 and 3 of 3.

Please help me in doing this with MASTER PAGES. All replies are appreciated.

Thanks in Advance,

Rajesh Ravindran

1 Reply

Avatar

Level 6

Place a text field on master page and place the below script on the event of layout ready. This will work for exact 10 pages (as per ur requirement), we can change for any pages, but need to know the page count before.

//Page 1

if

(xfa.layout.page(this) == 1){

this.rawValue

= xfa.layout.page(this) + " of " + 1;

}

//Page 2 - 6

if

((xfa.layout.page(this) > 1) && (xfa.layout.page(this) <= 6)) {

this.rawValue

= (xfa.layout.page(this)-1) + " of " + (xfa.layout.pageCount()-5);

}

//Page 7

if

(xfa.layout.page(this) == 7){

this.rawValue

= "";

}

//Page 8-10

if

(xfa.layout.page(this) > 7) {

this.rawValue

= (xfa.layout.page(this)-7) + " of " + (xfa.layout.pageCount()-7);

}

Hope this will help.

Raghu.