Copy link to clipboard
Copied
The form has a number of questions where the user may want to add additional information. To do this each question has a checkbox with code for a variable (the question number). On spawning, the question number is shown on the spawned page, which works. However, if another checkbox is selected, it picks up its specific variable and this variable is applied to all spawned pages, rather than just the current one.
Is there a way to prevent earlier spawned pages from recalculating, i.e. picking up the new variable.
Copy link to clipboard
Copied
When you spawn a template, you have the option of renaming fields, which is what you need to do. But your calculations have to be set up to take into account the new names, which follow a particular naming convention, as described in the SDK documentation.
Copy link to clipboard
Copied
Thanks George,
Are there any code examples for how this is done?
Copy link to clipboard
Copied
Not a lot, since it highly dependent on the specifics of your form. You might want to start here: https://help.adobe.com/en_US/acrobat/acrobat_dc_sdk/2015/HTMLHelp/#t=Acro12_MasterBook%2FJS_Dev_Temp...
And this should be helpful: https://lmgtfy.app/?q=Acrobat+JavaScript+spawn+template+calculations