Skip to main content
Participant
April 22, 2020
Question

Is there a way to automatically add/update page numbers when spawning new pages through a button

  • April 22, 2020
  • 1 reply
  • 307 views

Hello Everybody,

 

I may need help although I jave been searching a lot around but I still have problems:

 

I have created a fillable form in Pro DC, with a button to spawn additional pages on user side.

My button Works with the script: //"var a = this.getTemplate("NewNC");
a.spawn({nPage: pageNum + 1, bRename: true, bOverlay: false});" // and so far it works well.

 

Then I have been looking how to have a page numbering system which will update itself automatically and i found the option to create a text form field with the calculated script: //"event.target.value = event.target.page + 1;"//

 

My problem is that when I create all these page numbering fields it works well up to page 9, and after page 9 I  have results which are decimals like 0.6, 0.3... which is not correct.

 

Do you know what I can do to get rid of this decimal presentation ??

 

Many thanks in advance for your help & support.

Have a nice day.

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
April 22, 2020

It is working fine for me, although the code should really be:

event.value = event.target.page + 1;

Could you share a sample file with this issue?