Forum How do I...?

PDF form: allow multiple form fields with the same name in the document

avishnya
Hi there,

The requirement is to have form fields with the same name in the document, which allows us to enter data in one field on the front cover, and we want the same data to appear in the other field with the same name farther down in the document. When we ran this scenario through Prince, we noticed that the name of the second form field would be changed, and the index would be appended to the end of the field name:

front cover field name: interviewed_by
farther in the document field name: interviewed_by_1

Ideally, they should remain the same. Is there a way to tell Prince, not to index fields with the same name?

P.S. Please see attached screenshots for details.
  1. Screen Shot 2022-08-25 at 5.40.34 PM.png99.7 kB
  2. Screen Shot 2022-08-25 at 5.42.00 PM.png25.0 kB

Edited by avishnya

wangp
The PDF specification requires all form fields to be uniquely named. It does allow multiple representations of the same underlying form field (which is presented in Acrobat as if there are multiple form fields with the same name), but that's not something that can be expressed in HTML - to my knowledge.
avishnya
Can Price adopt the same approach as Adobe? If the parser finds multiple fields of the same type with the same name, then create the same underlining form field to share the input data. I know it's easy said than done. This behavior can be turned on/off as part of the Prince options. Would you at least consider this change?
wangp
I think there will need to be some mechanism to tell Prince to treat two form controls as the same field. There may legitimately be multiple fields with the same name, possibly across different forms.