2 Replies Latest reply on Nov 5, 2009 12:56 PM by Tilquinith

    How do I make sure AddInstance adds the extra pages in the order I want?

    Tilquinith

      My project is nearly complete. All thats left is to get the add instance button at the bottom of the second page to function in the way I want. Currently it's set on click with the following script.

       

      statcardform.frontpage.instanceManager.addInstance(1);

      statcardform.backpage.instanceManager.addInstance(1);

       

      When I click the button it adds a copy of the frontpage after the original frontpage, and a copy of the backpage after the original backpage. This is not what I had in mind. I need it to keep each front and backpage together, and add each repeated front and back page after the backpage so if you were to click the button multiple times you would get several copys of the same two page form.

       

      frontpage

      backpage

      frontpage

      backpage

      frontpage

      backpage

       

      etc...

       

      Currently what it does is this

       

      frontpage

      frontpage

      frontpage

      backpage

      backpage

      backpage

       

      How can I fix this so it works the way I want?

       

      The binding tab for each page is set to "Repeat Subform for each Data Item" and an initial count of "1" with no minimum and no maximum.