A worker in another department has created a couple of different forms. On both forms she added the custom "Page N of M" control to her forms. It works great on the first form but just shows page 0 of 0 on the 2nd.
I tried looking at the code in the script editor and the only difference I can see is this.
The form that works looks like this:
---form1.#subform[1].CurrentPage[1]::ready:layout - (JavaScript, client)--------
The form that does not work looks like this:
---form1.#subform[0].CurrentPage::ready:layout - (Javascript, client) -----
If they are essentially similar documents why does one have [0] and the other have [1] after subforms? Are subforms created automatically or is that something a user has to define?
Thanks much,
"Subforms" are an integral part of the whole XFA paradigm. And yes, the ones listed in your scripting SOM path were auto-generated for a new form. "form1" is the topmost (or document) subform, followed by "#subform", which represents an un-named page subform. If you're going to do any scripting you need to rename these page subforms to something meaningful and simple.
You can also create your own subforms for controling the document layout and scripting structure.
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script