Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
10

js that only works on current page?

Community Beginner ,
Mar 05, 2024 Mar 05, 2024

Hey guys,

 

my problem is that populated fields only works one the first page after being copied.

When i copied the same file into it, it said that all the fieldnames with the exact same name will become "one", could i do something against that?

 

i have a document/page that i need to have 2,3,4 or 5 times in inside the same pdf, with same fieldnames but i still wanna use the populate function to be working, does someone have an idea? i hope you get what i mean, my english is not the best for these typ of things.

 

 

TOPICS
Create PDFs , PDF forms
621
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 05, 2024 Mar 05, 2024

You will have to rename the fields for them to be unique. One easy way of doing that is to define the page as a Template, and then spawn copies from it using a script. The script can set all the fields to be renamed automatically.

I've developed a (paid-for) tool that allows you to do it with just a couple of clicks:

https://www.try67.com/tool/acrobat-duplicate-pages-of-a-pdf-file-including-form-fields

 

I'm not sure what you mean about using the "populate function" to fill them in, though.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 05, 2024 Mar 05, 2024

That doesnt work cuz it needs to work in the mobile version(app).

I think it doesnt work atm, right?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 05, 2024 Mar 05, 2024

You can't run the script itself on a mobile device, but you can run it on a regular desktop computer, and the file that will be generated by it will work on such a device.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 05, 2024 Mar 05, 2024

Ok, thanks.

Cant do it on a desktop computer, thats the problem.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 05, 2024 Mar 05, 2024
LATEST

You are asking for conflicting features. The fields in a form must have unique names to have unique values.  You'll need to use a naming scheme that prefixes the field names. For example "Page1.firstname". 

If this form is used on a mobile device you'll need to add-in all the pages up front.   Pages can't be added on a mobile device.  

So what mobile viewer are you using that "populates" data into a PDF form?  

Perhaps you should explain the workflow. Maybe there is another solution? 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines