Form entries with the same name do not share their values
Submitted by Gurb
Assigned to poppler-bugs
Link to original bug (#104619)
Description
Created attachment 136713 Test PDF file: a form with two fields whose names are 'name'
According to the PDF 1.7 standard (12.7.3.2), fields with the same fully qualified name shall have the same value. In Adobe Reader, when the user fills a text field, all other homonym fields are filled automatically with that value. Some PDF rely on this feature to autocopy their forms in different pages so that they can be delivered to different recipients once printed.
I guess this is a poppler bug since Evince and Okular do not show this behaviour. Different fields with a common name can be filled with different values. If the file is saved and opened in Adobe Reader the value of the first is shown in all of them. If opened in Evince or Okular, they show different values.
That happens in Arch Linux with poppler 0.61.1, evince 3.26.0+14+g2a499547-1 and okular version 17.12.1-1, but also in older versions. I attach a test PDF file.
PS: having a look at the source code it seems that different FormWidgetText can have a common FormFieldText parent, and when the value of any of the widgets changes, FormField::updateChildrenAppearance may refresh the displayed text of all other widgets for the field. But perhaps widgets are not created so that they share their parent.
Attachment 136713, "Test PDF file: a form with two fields whose names are 'name'":
form.pdf