Skip to main content
Level 2
Sep 22, 2014 3:30 PM UTC
Solved

how to use xfa.layout.pageCount()

Hi , I am trying to get the page count for the form i am designing,

by using the following on a text field

this.rawvalue = xfa.layout.pageCount();  --> i am not sure where to use this (on initialize, layout ready etc) ,i used for both of them and i am not getting any value on the form.

my intention is to use this field (with pagecount) to write a formula to show the address if say page count is less than 10 .

can somebody point me to the right direction, thanks in advance

christene

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
radzmar
radzmarAccepted solution
Level 10
Sep 22, 2014 6:41 PM UTC

Hi,

the pageCount method doesn't have any input parameters so you don't have to write anything within the bracket.

Use the following JavaScript in the layoutReady event to get the total page count:


this.rawValue = xfa.layout.pageCount();


3 replies

Level 2
Sep 22, 2014 3:41 PM UTC

i am getting the current page number by writing

this.rawvalue = xfa.layout.page(this);  - at the layout:ready

but how to get the pagecount..?

Translate
radzmar
radzmarAccepted solution
Level 10
Sep 22, 2014 6:41 PM UTC

Hi,

the pageCount method doesn't have any input parameters so you don't have to write anything within the bracket.

Use the following JavaScript in the layoutReady event to get the total page count:


this.rawValue = xfa.layout.pageCount();


Translate
Level 2
Sep 23, 2014 12:34 AM UTC

Thank you Radzmar

Translate