cancel
Showing results for 
Search instead for 
Did you mean: 

Conditionally Skip First Page

Former Member
0 Kudos

Hello,

Does anyone know how to conditionally skip the first page of a multi-page PDF form in SFP? I have a 4-page custom form and under certain conditions I would have to show the first two pages, sometimes the last two pages, and sometimes all four pages. Points will be awarded. Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Berline Chao

lets takes we have two pages,first page name is page1 and other one is page2.

write below script at page initialization section under javascript.

if(display page1 only == true){

xfa.form.form1.page2 = "hidden";

}

if(displaypage 2 == true){

xfa.form.form1.page1="hidden";

}

if page (subform)is position form, the content in the page will disappear and it will show as empty page.

if form(subform) is floating form, the total page will disappear.

Regards

malli...

Former Member
0 Kudos

Hi Malli,

Thanks for your response. When you talk about page1 and page2, are these master pages or body pages? Also, should I use the .presence attribute?

Berline

Former Member
0 Kudos

Hi,

sorry i forgot to add presence property, yes we need to use presence property only,

For master pages we can't apply i hope, for only body pages we can apply.

master pages define the orientation and dimensions of body pages. You can use master pages to define these aspects of a form design:

Page size and orientation

Headers and footers

Watermarks and company logos

Each master page is created with a default content area that covers the whole page. You can add text, images, and other boilerplate objects to a master page. These objects are displayed on all of the body pages that the master page is responsible for formatting.

Regards

malli...

Former Member
0 Kudos

After trying so many times, I was able to conditionally skip page 2 but I cannot skip the very first page. I tried to apply the similar logic that I did for page 2 for page 1 but page 1 always appears and appears with no data.

My logic for page 2 is below using FormCalc:

if ( $record.GV_PRODUCT_POS_FLAG eq "X" ) then

$.presence = "visible"

endif

and page 2's presence is initially set to "hidden".

I tried to use the same logic for page 1 but it doesn't work. I've also ensured that page 1's subform content is "flowed".

Any othe rideas why I can't conditionally skip the very first page, especially when there's definitely going to be pages 3 and 4?

Any help will be rewarded. Thanks!

Berline

Answers (0)