how to use xfa.layout.pageCount() | Community
Skip to main content
Level 2
September 22, 2014
Solved

how to use xfa.layout.pageCount()

  • September 22, 2014
  • 3 replies
  • 6490 views

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.
Best answer by radzmar

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
September 22, 2014

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..?

radzmar
radzmarAccepted solution
Level 10
September 22, 2014

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();


Level 2
September 23, 2014

Thank you Radzmar