我正在使用DocuSign c#SDK,并尝试使用HTML表单中的值自动填充DocuSign模板中的文本字段。我可以填充FullName和Email字段,因为我相信信息是通过TemplateRole传递的。但是,我似乎无法找到如何将信息传递到我创建的自定义字段的示例。我能找到的一切都是纯粹的JSON请求。我假设SDK中必须有方法来处理这个问题。有任何想法吗?谢谢!
public EnvelopeSummary CreateEnvelopeFromTemplate(LoanApplicationModel model)
{
EnvelopeDefinition envDef = new EnvelopeDefinition();
envDef.EmailSubject = "DocuSign Test - Please sign this document";
TemplateRole tRole = new TemplateRole();
tRole.Email = model.Email;
tRole.Name = model.FirstName + " " + model.LastName;
tRole.RoleName = "Client";
List<TemplateRole> rolesList = new List<TemplateRole>() {tRole};
envDef.TemplateRoles = rolesList;
envDef.TemplateId = "*******";
envDef.Status = "sent";
EnvelopesApi envelopesApi = new EnvelopesApi();
EnvelopeSummary envelopeSummary = envelopesApi.CreateEnvelope(accountId, envDef);
Console.WriteLine("EnvelopeSummary:\n{0}", JsonConvert.SerializeObject(envelopeSummary));
Trace.WriteLine("Envelope has been sent to " + tRole.Email);
return envelopeSummary;
}
答案 0 :(得分:1)
在TemplateRole内部,您需要使用Tabs,如果您需要填充TextTab,那么您需要将Sink
添加到您的tRole和textTab
TabLabel
应该完全匹配模板中的内容。
TextTab