Skip navigation
creditunion123
Currently Being Moderated

spawning templates

Feb 4, 2013 8:32 PM

Tags: #templates #template_spawning #spawn

I am not sure what I am doing wrong.  I have never used spawning for templates.  I am lucky that our organization has Adobe Pro for all staff so I have used coding that will just show/hide templates if certain fields are filled in.

 

I am working forms for another institution and their staff only have Adobe Reader.  I saw Adobe Reader XI now has ability to spawn templates so I thought I would give spawning another go

 

My code will indeed spawn the pages I want - whoo hoo

But when I put the forms into the banking system to prefill the field values from the database as soon as I click the button to spawn the pages required it strips out the information in the field values

My code is as follows (not full code but you will get the idea

var a2 = this.getTemplate("signor2a");

var b2 = this.getTemplate("signor2b");

var a3 = this.getTemplate("signor3a");

var b3 = this.getTemplate("signor3b");

var a4 = this.getTemplate("signor4a");

var b4 = this.getTemplate("signor4b");

 

 

if (Signors.bChk5) {

    

  a2.spawn({nPage: this.numPages +1,bRename:false,bOverlay:false})

    

  b2.spawn({nPage: this.numPages +1,bRename:false,bOverlay:false})

    

  a3.spawn({nPage: this.numPages +1,bRename:false,bOverlay:false})

    

  b3.spawn({nPage: this.numPages +1,bRename:false,bOverlay:false})

    

a4.spawn({nPage: this.numPages +1,bRename:false,bOverlay:false})

    

  b4.spawn({nPage: this.numPages +1,bRename:false,bOverlay:false})

    

a5.spawn({nPage: this.numPages +1,bRename:false,bOverlay:false})

    

b5.spawn({nPage: this.numPages +1,bRename:false,bOverlay:false});

    

this.pageNum++;     

}

 

 
Replies
  • Currently Being Moderated
    Feb 5, 2013 12:49 AM   in reply to creditunion123

    Why did you set the bRename parameter to false? That means that the form

    fields in the spawned pages will have the same names as those on the

    original page, and therefore the same values. Is that your intention?

     
    |
    Mark as:
  • George Johnson
    11,661 posts
    Aug 11, 2002
    Currently Being Moderated
    Feb 5, 2013 12:56 AM   in reply to creditunion123

    Are you sure the fields in the templates are correctly filled before you spawn them? Are the template pages hidden before you spawn them? Exactly how are you prefilling the fields?

     

    Note that although Reader 11 can spawn templates, it cannot be used to hide pages that are templates. Pages that are added by spawning a template are not templates themselves.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points