Skip to main content

I Can’t find any way to set prefill tabs data
thru all posts it looked like I should do it this way, but it doesn't work
 

let results = await envelopesApi.createEnvelope(accountId, {

            envelopeDefinition: {

                templateId: 'xxxxxxxxxxxxxxxxx',

                templateRoles: Â

                    {

                        email: 'reciepient@gmail.com',

                        name: 'john doe',

                        roleName: 'client'

                    },

                ],

                tabs: {

                    prefillTabs: {

                        textTabs: t

                            {

                                tabLabel: 'name',

                                value: 'Jabberwocky!',

                            },

                            {

                                tabLabel: "text",

                                value: 'lorem ipsum'

                            }

                        ]

                    }



                },

                status: 'sent'

            },

        });

 

Hi ​@tzelshy,

 

Prefill tabs and recipient tabs are different types. You should check in your template which type you’ve used. 

 

Prefill tabs (gray color in our UI) are meant to be document tabs and not linked to a recipient. They cannot be filled from the envelope creation, and you would need to use any of our EnvelopeDocumentTabs SDK methods to update these values after creating the envelope as a draft. 

 

Recipient tabs (recipient color defined in the UI) are meant to be tabs set for a recipient. You can prefill the content as you did in your payload, but the prefillTabs object should not be used in this scenario.

 

The tabs object declaration should be: 

{
// content removed for brevity

tabs: {
textTabs:
{
tabLabel: "name",
value: "Jabberwocky!",
},
{
tabLabel: "text",
value: "lorem ipsum"
}
]
}

// content removed for brevity
}

 

Please let us know if this answer helped you, and if so, please mark it as the best answer. 

 

Regards,

Renan