Javascript: Getting the first number in Field.Page array
I'm working on a button script that will tell a user which required fields are yet to be filled-out. I'm halfway there, and code is below. The problem is when a field name is encountered on more than one page (which is common on my document, which is a collection of forms) it returns an array of the page numbers, such as "1, 2, 5". I was thinking it would be less confusing to the users to just see mention of the first instance of each field's page number, and once filled-in, the others with the same field name would be filled-in as well. Is there a way to get the first item in the Field.Page array?