Expandir minha barra de realizações na Comunidade.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

Esta conversa foi bloqueada devido à inatividade. Crie uma nova publicação.

SOLUCIONADO

How to show current page number in formcalc?

Avatar

Level 2

I have a client who won't allow JavaScript in their forms for security reasons.  I'm trying to convert the JS I've used to work with FormCalc instead, but I don't have much experience with FC and I'm stuck at the first hurdle.

I want to display the current and total pages in the master page and I've changed the generated code to use FormCalc and changed to use the dollar reference, but the form doesn't render the current page number.

Here's the code

return.#pageSet[0].Restricted.CurrentPageNumber::ready:layout - (FormCalc, client)

//Doesn't work, even though it's copied from the reference material

this.rawValue = xfa.layout.page($)

// also tried

$ = xfa.layout.page($)


return.#pageSet[0].Restricted.NumberofPages::ready:layout - (FormCalc, client)

//Works

this.rawValue = xfa.layout.pageCount()

Any and all help would be really appreciated

1 Solução aceita

Avatar

Resposta correta de
Level 10

Hi,

to get the current page, you can use the index of your master page ("Restricted").

$ = $.parent.index +1

and for the total pages use

$ = $layout.pageCount()

Ver solução na publicação original

2 Respostas

Avatar

Resposta correta de
Level 10

Hi,

to get the current page, you can use the index of your master page ("Restricted").

$ = $.parent.index +1

and for the total pages use

$ = $layout.pageCount()

Avatar

Level 2

Perfect, thanks Radzmar!