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.

Display master page text on specific pages of dynamic form

Avatar

Level 2
I have a text object on my *master page* -- outside a content area. Depending on user input, my form may grow to several pages.



Is it possible to script some event so that the text displays on all but the last page? I have seen examples of xfa.layout.pageCount() and xfa.layout.page(this), but am probably missing an obvious point.



I think that point is how, at run time, to know, for example, this is page 3, there are 5 pages in the form -- the master page text should be displayed. Or, even, this is the last page of a 7 page form -- the master page text should not be displayed.
4 Replies

Avatar

Former Community Member
I am sure this can be done ...I will work on a sample for you. Post your email address and I will send it when complete.

Avatar

Level 2
darrell DOT fulmer AT mosaicinfo DOT org



Thank you, Paul. I thought this seemed like a fairly simple thing, but have spent quite a bit of time and have not hit on the answer.



I have a form which can expand. By convention, the text ' -MORE- ' should appear at the bottom of a page if there is a next page. So, it does not appear if the form only takes a single page, and it does not appear at the bottom of the last page.



My idea was to put ' -MORE- ' as a text object at the bottom of the master page, outside the page's content area, then to control its visibility, depending on the constraints above.

Avatar

Level 2
Thank you. Your script is exactly what was required.