【问题标题】:Pre-filling Tabs on a Template in DocuSign在 DocuSign 中的模板上预填充选项卡
【发布时间】:2020-05-18 08:43:25
【问题描述】:

我正在使用从 DocuSign 开发页面链接的 C# JWT-framework.sln。

我的 API 在演示环境中工作,我可以执行以下操作:

  1. 发送一个信封,对签名块的位置进行位置控制。
  2. 发送信封并动态添加选项卡并为这些选项卡定位和设置值。
  3. 检索已签收的信封。
  4. 使用预定义的模板发送信封。

下面的代码使用我的模板生成一个信封......但我无法解决我的生活,弄清楚如何获取模板中存在的选项卡对象列表,以便我可以预先用数据预先填充它们发送信封以供签名。

EnvelopeDefinition envelopeDefinition = new EnvelopeDefinition
        {
            EmailSubject = "Please sign this test document"
        };

        envelopeDefinition.TemplateId = "5a56ee22-91dd-443e-85f4-bd43b446db5b";

我想我需要使用 TemplateTabs 类,但我找不到任何示例来说明如何遍历模板上的所有选项卡,然后根据选项卡 ID 更新特定选项卡。

任何帮助将不胜感激。

谢谢 有限的

【问题讨论】:

    标签: c# jwt docusignapi


    【解决方案1】:

    我们有一个code example 向您展示如何执行此操作。

    (当然,你的模板不一样,只是给你一个想法)

    C# relevant snippet 在这里:

     // Set the values for the fields in the template
            // List item
            List colorPicker = new List
            {
                Value = "green",
                DocumentId = "1",
                PageNumber = "1",
                TabLabel = "list"
            };
    
            // Checkboxes
            Checkbox ckAuthorization = new Checkbox
            {
                TabLabel = "ckAuthorization",
                Selected = "true"
            };
             Checkbox ckAgreement = new Checkbox
            {
                TabLabel = "ckAgreement",
                Selected = "true"
            };
    
            RadioGroup radioGroup = new RadioGroup
            {
                GroupName = "radio1",
                // You only need to provide the readio entry for the entry you're selecting
                Radios = new List<Radio> { new Radio { Value = "white", Selected = "true" } }
            };
    
            Text includedOnTemplate = new Text
            {
                TabLabel = "text",
                Value = "Jabberywocky!"
            };
    
            // We can also add a new tab (field) to the ones already in the template
            Text addedField = new Text
            {
                DocumentId = "1",
                PageNumber = "1",
                XPosition = "280",
                YPosition = "172",
                Font = "helvetica",
                FontSize = "size14",
                TabLabel = "added text field",
                Height = "23",
                Width = "84",
                Required = "false",
                Bold = "true",
                Value = signerName,
                Locked = "false",
                TabId = "name"
            };
    
            // Add the tabs model (including the SignHere tab) to the signer.
            // The Tabs object wants arrays of the different field/tab types
            // Tabs are set per recipient/signer
            Tabs tabs = new Tabs
            {
                CheckboxTabs = new List<Checkbox> { ckAuthorization, ckAgreement },
                RadioGroupTabs = new List<RadioGroup> { radioGroup },
                TextTabs = new List<Text> { includedOnTemplate, addedField },
                ListTabs = new List<List> { colorPicker }
            };
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-10-27
      • 2022-01-17
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多