Quantcast
Channel: Adobe Community : Popular Discussions - JavaScript
Viewing all articles
Browse latest Browse all 12130

Spawn template pages... having trouble

$
0
0

Hello all,

 

I'm trying to create a document that allows users to add additional pages as needed.  It's a 2-page document with an optional page(s) that goes in the middle (I made the middle page into the hidden template).  I'm not a programmer and don't have any knowledge of javascript, so I'm having a hard time with this.  I'll try to explain this as best as I can:

 

Page 1 is the intro page that users will fill out initially.  The optional middle page is an extension of some of the fields found on page 1 - it basically adds a page of new rows.  This page contains calculations, which don't seem to duplicate.  The last page is a signature page with different information on it. I made a button "Click to Add More Fields" on the first page and I am using this script to generate new pages:

 

var a = this.getTemplate("Add More Fields");a.spawn();

 

It seems like it works to generate the pages, but I'm having trouble with a few things.

 

1. The calculations don't copy over to the new pages, it just auto populates whatever I put on the first added page and when I change the numbers, the calculation is broken so the numbers don't add up.  Is it even possible to use the template feature with calculations?

2. The new pages just copy all the info from the first spawned one - I want the user to start out on a fresh page each time rather than having to overwrite the info that auto populated.

3. I have some day and date code fields that I would like to be copies from the very first page so the user doesn't have to enter them on each new page.

4. New pages spawn at the end of the document... I would like them to spawn before the last (signature) page.

5. Is there a way to add page numbering that automatically adjusts based on the number of pages a user spawns?

 

Sorry for all the questions.  If anyone has any input I would be grateful... I fear I'm a little out of my depth here, I've been reading for hours and it's not making much sense.


Viewing all articles
Browse latest Browse all 12130

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>