Hi everyone,
I’m able to send out envelopes for signature in Node.js via the docusign-esign NPM package, but my text fields are not populating for some reason. I am referencing the documentation linked here. I’ve tried both on our developer account as well as our production account.
Here is my code for creating the envelope. I am getting the label and ID for the text fields through the Docusign API, and I have double-checked the label is correct through the Docusign webapp itself.
function makeEnvelope(args) {
try {
let envelope = new docusign.EnvelopeDefinition();
envelope.templateId = args.templateId;
let text = docusign.Text.constructFromObject({
tabLabel: TAB_1_LABEL,
value: 'test text field!',
});
let textExtra = docusign.Text.constructFromObject({
font: 'helvetica',
font_size: 'size14',
tabLabel: TAB_2_LABEL,
height: '23',
width: '84',
required: 'false',
bold: 'true',
value: "test value!!!!",
locked: false,
tabId: TAB_2_ID
});
let tabsFromDocs = docusign.Tabs.constructFromObject({
textTabs: text, textExtra]
});
let signer1 = docusign.TemplateRole.constructFromObject({
email: args.signerEmail,
name: args.signerName,
roleName: 'signer',
tabs: tabsFromDocs
});
let signer2 = new docusign.TemplateRole();
signer2.email = args.signer2Email;
signer2.name = args.signer2Name;
signer2.roleName = 'signer';
envelope.templateRoles = asigner1, signer2];
envelope.status = 'sent';
return envelope;
} catch (error) {
console.log({ errorMakeEnvelope: error });
}
}
Thank you in advance!