You type a name into one box on a PDF form and that same value suddenly appears in two or three other boxes on the page. You did not script those fields, and the data you sent only targeted one. The form looks broken, but it is doing exactly what the PDF specification tells it to.
Why this happens
In a PDF form, a field is identified by its fully qualified name, not by its position on the page. When two or more widgets share the same name, the PDF treats them as one logical field with one value. Set that value once and every widget that carries the name displays it. This is standard behavior across viewers and form-filling libraries, so the same value mirrors into each copy by design.
Duplicate names usually creep in when a field is copied and pasted in an editor, when a template page is duplicated, or when an authoring tool reuses a generic name like Text1 for several fields. The fields look separate, but under the hood they are the same field.
Confirm it by listing the field names
Before changing anything, inspect the template so you can see which names repeat. With the pypdf library in Python, list every field and how many widgets it controls:
from pypdf import PdfReader
reader = PdfReader("template.pdf")
fields = reader.get_fields()
# Count how many widgets each field name controls.
for name, field in fields.items():
kids = field.get("/Kids")
widget_count = len(kids) if kids else 1
print(f"{name}: {widget_count} widget(s)")Any name reporting more than one widget is a field that will mirror its value into every copy.
The fix: give each field a unique name
If the fields are meant to hold different values, rename them in your PDF editor so each one is unique, for example borrower_name and cosigner_name instead of two fields both named name. After renaming, send a distinct value for each name and the mirroring stops. If you genuinely want the same value to repeat, such as an account number printed in a header and a footer, keeping a shared name is the simplest way to do it.
The same rule applies when you fill PDFs programmatically. Anvil fills templatized PDFs from JSON by matching your data keys to field names, so a clean template with unique names maps cleanly to your data and avoids surprise duplicates.
Back to All Questions