I have an envelope that is comprised of 5/6 templates with various fields within each of the documents that need to be populated. Many of these are marked by a string that I want to replace such as $$string-to-replace$$. The values for these are pulled from a db.
My first thought was to do this with prefilled tabs but I got an error that I couldn't have PrefilledTabs within a recipient definition, so I moved to TextTabs. Example code shown below:
Text text = new Text
{
FontSize = "size12",
FontColor = "black",
Locked = "true",
AnchorString = anchorStringValue.AnchorString,
Value = anchorStringValue.AnchorValue
};
textTabList.Add(text);
Tabs signerTabs = new Tabs {SignHereTabs = signHereList, TextTabs = textTabList};
signer.Tabs = signerTabs;
This somewhat works but the text underneath shows up underneath the value when it is placed using an anchor string. From another post I saw that this could be fixed by making the text in the templates white but that makes it hard for edits to be made in the future so I would like to avoid this if possible.
Ideally, I want to allow another member of my team to make the templates in the Docusign UI and then have labeled text fields that I can replace using the docusign api / code. Any suggestions on how to do this?
Acutally I figured out what I wanted to do. I can assign Roles to the template fields that I add (checkbox, text, etc.) in the UI. And then in the API when I assign signers to the envelope I can assign them the Role I specified in the template. Hope this helps someone in the future
You can update the text in the textbox's etc like this
Text inlcudedOnTemplateTest2 = new Text
{
TabLabel = "test_text2",
Value = "TESTING TEXTBOX 2",
Locked = "true"
};
And you can assign that role to each signer like this
Signer signer = new Signer
{
Email = "####email####",
Name = "####Name####",
RecipientId = "1",
RoutingOrder = "1",
RoleName = "Signer"
};