Duplicate form fields without linking?
Copy link to clipboard
Copied
First off all, sorry for my bad english, its not my language...
I want to duplicate some form fields to other pages, but when i do this they appear to be linked to each other, when i write something in one page, in the other pages it is there too; But it is not what i want to do, i want to duplicate the forms to other pages whithout linking then.
Here some prints of the document.
These are the form fields i want to duplicate.
This is a example of one of the pages i want to duplicate the forms to.
I know its caused beacuse the names are the same.
I saw in this post that i can use a script, but this script uses a page template, and my pages are already created, i just want the forms. I'm using another technique in the same post, that u create another document to create multiple copies that renames the forms e copy then back to my original document. But it will be a lot of work, i have to do this to 10 books, each of then with at least 90 pages that need to have forms, so i want a way to do this faster.
Copy link to clipboard
Copied
Hi,
Once you have copied the fields, if you rename them that would break the link.
Acrobat assumes that all fields that have the same name are the same field (simplified but should give the idea)
Malcolm
Copy link to clipboard
Copied
Hi, yes i know that, but it will be a ton of work to rename each one of then. and i dont have enough time to do this. I'm doing the way i can at the moment, but i want something faster and automatic.
Copy link to clipboard
Copied
You can use page templates.
Copy link to clipboard
Copied
The problem is that all my pages are different, and when i use a page template it create new pages. Have a way that i can use a page template above the other pages?
Copy link to clipboard
Copied
"Have a way that i can use a page template above the other pages?"
After the use of the page template you can replace the pages.
Copy link to clipboard
Copied
I as stated in my first post, where I provided a list of steps for using a template. A page template can overlay another page. Overlay is a parameter in the spawn function. Here's the reference entry.
Use the Acrobat JavaScript Reference early and often
Copy link to clipboard
Copied
Its not that difficult to use a page template to copy the fields.
1) Insert a new blank page in to the PDF,
2) Copy the fields to the new page using the "Duplicate Across Pages" tool so they are in the exact same location.
3) turn new page into a template
4) write script to spawn template to rename and overlay fields on other pages
5) delete template page
There is another technique that works even better. Which is to write a script to add the fields to all the other pages, using the coordinates of the field on the first page. It's better because you have exact control over the field naming and if you know how to code it's easier than screwing around with the templates.
Use the Acrobat JavaScript Reference early and often
Copy link to clipboard
Copied
Hi Thom, you know where i can learn how to make this script? or somewhere its available?
Copy link to clipboard
Copied
The easiest thing to do is to use the console window for your script.
You'll find a tutorial here on the console:
https://www.pdfscripting.com/public/Free_Videos.cfm#JSIntro
Here's an article that explains field placement, and provides a sample script
https://www.pdfscripting.com/public/PDF-Page-Coordinates.cfm
And you'll find some basic info on form scripting here:
https://www.pdfscripting.com/public/PDF-Form-Scripting.cfm
The strategy for doing this is
#1 get the information (field properties) you need to add the fields from the field on the first page, such as the placment rectangle,
#2 Then use a "for" loop to add a new field to the other pages using the info from #1.
Use the Acrobat JavaScript Reference early and often
Copy link to clipboard
Copied
You can use this (paid-for) tool I've created to automatically rename all duplicate form fields so that they have unique names: https://www.try67.com/tool/acrobat-rename-duplicate-fields-to-unique-fields
Be aware that in the process they will lose any Calculation, Validation, Formatting, etc. settings you've applied to them, though.
Copy link to clipboard
Copied
Hi. I considered purchasing one of your tools, but i'm Brazilian, and here each dollar costs 5,71 reais (Brazilian currency), so your tool will cost me 270 reais, and unfortunately i don't have the money to buy. But i appreciated.

