4 Replies Latest reply: Feb 5, 2013 8:02 AM by creditunion123 RSS

    spawning templates

    creditunion123 Community Member

      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++;     

      }

       

        • 1. Re: spawning templates
          try67 ACP/MVPs

          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?

          • 2. Re: spawning templates
            George_Johnson ACP/MVPs

            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.

            • 3. Re: spawning templates
              creditunion123 Community Member

              Yes, this was my intention

              Example the field value in the template is FormValues.accountNames_2 - to grab the second signor on the account

              If there is a 2nd signor I just want to basically unhide the form, which I can do no problem with my code for my own organization as we all have Pro

               

               

              If adobe xi will unhide a form perfect but I was only reading that it worked if you "spawned" a template

               

              I have confirmed that the form is indeed pulling the correct information as I unhid the templates, loaded the form back into the system and brought the form up from the account and they were all filled in perfectly

              • 4. Re: spawning templates
                creditunion123 Community Member

                Yes, see reply to other question.  If I unhide the templates and run it pulls the information fine

                I hide the templates - reload and bring up from data base and tick spawn and I get a blank templaaate without the field values

                 

                If adobe reader xi  could unhide forms using my existing code I have for my organization that would be great. But I am sure I tried and it did not, sigh.....