Search code examples
javatabsdocusignapicomposite

I have created a composite template , if i am adding 2 documents then 2 same tabs for signing are added but I want one signing tab for each document


I have created a composite template. for every document added in the composite template , there is same signing tab is added in the document eg- 3 documents then 3 tabs one over above. I want one tab per document.

        List<CompositeTemplate> compositeTemplateList = new ArrayList<>();
        for (no of documents) {
         
            for (no of templates) {
                CompositeTemplate cTemplate = new CompositeTemplate();
                ServerTemplate serverTemplate = new ServerTemplate();
                serverTemplate.setTemplateId();
                serverTemplate.setSequence();
                cTemplate.setServerTemplates(Arrays.asList(serverTemplate));
                cTemplate.setCompositeTemplateId();
                cTemplate.setDocument();
                InlineTemplate inlineTemplate = new InlineTemplate(); 
                for(list of signers) {
                    signer.setEmail();
                    signer.setName(); 
                }
                recipients.setSigner();
                inlineTemplate.setRecipients();
                inlineTemplate.setSequence();
                cTemplate.setInlineTemplates(Arrays.asList(inlineTemplate));
                compositeTemplateList.add(cTemplate);
            }
        }
        env.setStatus("sent");
        env.setCompositeTemplates(compositeTemplateList);
        

I tried adding email and mobile details only one time but that didn't work.


Solution

  • Are you using auto-place (anchor strings) for your template tabs? Or are you using any Envelope Custom Fields that use auto-place? This is a common issue with auto-place if you are not using unique text strings on each document