We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.
I am a sign maker (printing-side) by trade, not much of a programmer. I am in the process of creating a new work order form for the company. Most of the jobs we do have multiple prints with multiple files and each has it's own dimensions, materials, etc.
So far I have made a form for a single print job (attached image). It contains information such as the print file name, print width, height, material to print on, substrate material, etc. I have it set up to calculate square footage which then calculates a billing price and a cost price depending on what material is selected, size, etc. All is working mostly as intended (got a few kinks to iron out still).
What I am trying to accomplish though, is to have a persistent form that has one of the above instances in it. On the persistent form would be a button that says something like "Add Print". Upon clicking the button, another instance of the above form would appear below the original one. Each time the Add Print button is clicked, another instance would appear. Each instance would allow for it's own print file information, all of the contained variables would correspond to the appropriate instance, and all instances would be contained within the persistent form.
I hope I make sense explaining this.
Can this be done in Acrobat?
Yes, it can be done by defining the page as a Template object and then spawning new copies of it.
Thank you for the response. I am not a complete noob with programming, but I wouldn't call myself a programmer by any means. I have been using Unreal Engine for about 4 years now and using the visual scripting they have. Although I know it's not real programming, it has taught me variables, arrays, enums, switches, if statements, functions, data structures, etc. I understand how and when to use those things. I have been doing a JS bootcamp for the past few days to try and get a grasp on things and most of it is making sense.
I will look into the template object that you mention and hopefully I will be able to make sense of that. I understand where the issue will come though, since all of my existing scripts reference the specific form names.
If you search this forum for templates and spawn you will find plenty of info. The names of the renamed fields on the spawned pages are predictable (it contains some fixed strings, the Template name, the page number to which it was spawned and the original field name, basically), so it's possible to write a generic code that will calculate their value using other fields on the same page, even if you don't know that page in advance.
That makes sense, thank you.