I'm working on a form for safety reviews. When filling it in, the user is supposed to declare all safety events first.
I have a set of 2 pages that I would like to duplicate for each safety event (1 safety event = 2 analysis pages). In a nutshell, the total number of pages of my form depends on the number of safety events declared.
All my safety events are declared in text fields (1 filled text field = 1 safety event).
I would like, if it is at all possible (but I'm confident it is) to have, each time a safety event text field is filled, my 2 analysis pages to be duplicated so that, in the end, I have 2 analysis pages per safety event.
I hope I'm being clear here, don't hesitate to ask questions.
I'm gonna keep on looking, in the meantime, I thank you for your precious help.
To do that you would need to convert your pages into Template objects and then you'll be able to spawn new copies from them, using a script. This is a complex task, though.
Ok, I'm gonna do some research on that.
I'll let you know what I find.
I succeeded, a quick view on how.
I put my 2 analysis pages in a separated file (insert.pdf).
Then, after inserting the 2 pages, it creates the fields to be filled in (because I don't want all the analysis fields to come from my insert.pdf file otherwise they will all show the same data). The function for that task is addField.
I can send some code if needed.