Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Determine if a subform is breaking across pages

Geckoz100
Level 5
Level 5

Hello,

I would like a title bar, "Applicant Information (cont'd)" to appear on the second page of my form, but only if it detects that the subform on the first page is breaking and continuing onto the second page.  Is there any way to do this with javascript?  This is the pseudocode for what I need:


If (subform1 breaks onto second page) {


     MasterPage2.Titlebar1.presence = "visible";


     }


     else  {


          MasterPage2.Titlebar1.presence = "hidden";


          }


Is it possible to reference a text box like that on one of the Master pages?

1 Accepted Solution
_Bruce_Robertson
Correct answer by
Level 10
Level 10

Hi,

This sounds like the sort of thing that is done with what Adobe Designer calls an overflow leader, have a look at this sample and see if it does what you want https://sites.google.com/site/livecycledesignercookbooks/home/OverflowLeader.pdf?attredirects=0&d=1

To create an overflow leader, select the repeating subform (Row in the image below) and select a subform to be used as the continuation header, if you haven’t created it yet then you can select “new” from the Overflow Leader dropdown list.  Selecting new just creates a subform which you can update as usual (in the sample I just added a “Heading (continued)” text object.

OverflowLeader.jpg

So that the subform is not included as part of the normal content of the form, select the subform in the Hierarchy palette and drag it to the “(Reference Objects)” node.

Hope that helps

Bruce

View solution in original post

5 Replies
_Bruce_Robertson
Level 10
Level 10

Hi,

You might be able to use the absPageSpan() method

xfa.layout.absPageSpan(Subform1)

will return the number of pages Subform1 spans.

Regards

Bruce

Geckoz100
Level 5
Level 5

Thanks, Bruce.  It occurred to me later I should ask -- If a subform has a text box as a title bar, and the subform is set to break across pages, is there a way for that text/title bar to appear at top of the next page?  That's what I was trying to accomplish by creating a Page 2 master page with the title bar at the top of the page, to say "continued".

_Bruce_Robertson
Correct answer by
Level 10
Level 10

Hi,

This sounds like the sort of thing that is done with what Adobe Designer calls an overflow leader, have a look at this sample and see if it does what you want https://sites.google.com/site/livecycledesignercookbooks/home/OverflowLeader.pdf?attredirects=0&d=1

To create an overflow leader, select the repeating subform (Row in the image below) and select a subform to be used as the continuation header, if you haven’t created it yet then you can select “new” from the Overflow Leader dropdown list.  Selecting new just creates a subform which you can update as usual (in the sample I just added a “Heading (continued)” text object.

OverflowLeader.jpg

So that the subform is not included as part of the normal content of the form, select the subform in the Hierarchy palette and drag it to the “(Reference Objects)” node.

Hope that helps

Bruce

View solution in original post

Geckoz100
Level 5
Level 5

That is amazing!  Worked like a charm.  Thanks again.  Adobe sure doesn't make it easy to find out these tricks.  I do have a question though -- once you drag the subform with the overflow leader into Referenced Objects, how do you edit it?  I found that I have to make the parent object break, so that it forces the leader to show, then I can edit it, but otherwise it stays hidden even if I select it.

_Bruce_Robertson
Level 10
Level 10

Hi,

You can drag the subform back and forward between the form node and (reference node)  of the hierarchy palette.  I guess you could just select the subform that is the initial header and add the smarts into it so it looks like a continuation header ... but I haven't tried that.

Regards

Bruce