Skip to main content
jenniferp35202904
New Participant
June 19, 2018
Answered

Search for linked form fields?

  • June 19, 2018
  • 2 replies
  • 745 views

I have a very large PDF document with thousands of text-based form fields. Though I have searched the names of every form field and didn't find any that are duplicated, my client keeps insisting some fields are populating from somewhere else in the document. They of course can't tell me what fields are auto-populating, or if it's coming from fields before or after a specific page. I can't duplicate the issue without manually testing each field. Since there are 1000’s of fields, I'm wondering if there is a way to do a search for fields that are linked, or named identically? Can anyone help?

This topic has been closed for replies.
Correct answer try67

I encountered a similar issue so I developed this code to identify those annoying duplicate fields. Run this code from the JavaScript Console:

for (var i=0; i<this.numFields; i++) {

    var f = this.getField(this.getNthFieldName(i));

    if (f==null) continue;

    if (f.type=="text" && typeof f.page=="object") {

        console.println(f.name + ":" + f.page);

    }

}

It will print out all the names of any duplicated text fields, as well as on which pages they are located, so you could track them down more easily.

2 replies

Bernd Alheit
Braniac
June 20, 2018

Check also the JavaScript code in the form.

try67
try67Correct answer
Braniac
June 20, 2018

I encountered a similar issue so I developed this code to identify those annoying duplicate fields. Run this code from the JavaScript Console:

for (var i=0; i<this.numFields; i++) {

    var f = this.getField(this.getNthFieldName(i));

    if (f==null) continue;

    if (f.type=="text" && typeof f.page=="object") {

        console.println(f.name + ":" + f.page);

    }

}

It will print out all the names of any duplicated text fields, as well as on which pages they are located, so you could track them down more easily.

jenniferp35202904
New Participant
June 20, 2018

Thank you so much!!! This found 2 sets of fields with the same name! What a lifesaver!!