简体   繁体   English

DocuSign - 通过 JSON 标记添加预填充标签

[英]DocuSign - Add pre-fill tabs through JSON marker

I'm creating a html document and want to place tabs using JSON markers .我正在创建一个 html 文档并希望使用JSON 标记放置标签。 This method works for common tabs of signers.此方法适用于签名者的常用选项卡。 However, I want to add pre-fill tabs for senders using the same approach but all pre-fill tabs are not showing up.但是,我想使用相同的方法为发件人添加预填选项卡,但所有预填选项卡都没有显示。

I'm using CompositeTemplate to generate the envelope.我正在使用CompositeTemplate生成信封。 As pre-fill tabs don't belong to any recipients, so I put them under document level.由于预填标签不属于任何收件人,所以我将它们放在文档级别下。 The code snippet looks like代码片段看起来像

EnvelopeDefinition().apply {
  emailSubject = ...
  emailBlurb = ...
  this.status = "created"
  compositeTemplates = listOf(
    CompositeTemplate().apply {
      document = Document().apply {
        documentId = "1"
        name = "some document.pdf"
        htmlDefinition = "<div>{{\"tabLabel\": \"exampleTextTab\"}}</div>"
        tabs = Tabs().apply {
          prefillTabs = listOf(
            PreFillTab().apply {
              tabLabel = "exampleTextTab"
              font = "arial"
              fontSize = "size8"
              locked = "true"
            }
          )
        }

Pre-fill tabs don't currently work with Composite Templates.预填充选项卡目前不适用于复合模板。 DocuSign internal ticket TT-5404 DocuSign 内部票证 TT-5404

Solutions解决方案

Will your API program be setting the values of the pre-fill tabs?您的 API 程序会设置预填充选项卡的值吗? If so, then don't use pre-fill tabs.如果是这样,则不要使用预填充标签。 Instead:反而:

  • use regular tabs with the first signer与第一个签名者一起使用常规选项卡
  • set the locked attribute to truelocked属性设置为true

This makes the tabs read-only and they will be visible to all recipients.这使选项卡成为只读的,并且它们将对所有收件人可见。 This will have the same effect as your API application adding and setting pre-fill tabs to the envelope.这将与您的 API 应用程序在信封中添加和设置预填充标签具有相同的效果。

Pre-fill tabs are needed when the Sender needs to fill in the values and the Sender is not one of the recipients of the envelope.发件人需要填写值并且发件人不是信封的收件人之一时,需要预填选项卡。

For an API program that uses the Sender View to enable the Sender to review the envelope and fill in pre-fill tabs, there are some options:对于 API 程序,它使用发件人视图使发件人能够查看信封并填写预填选项卡,有一些选项:

  • Your API application can ask the Sender for the pre-fill tab values.您的 API 应用程序可以向发件人询问预填充选项卡值。 Your application can then set those values as regular (locked) tabs as described above.然后,您的应用程序可以将这些值设置为如上所述的常规(锁定)选项卡。
  • Or you could add the pre-fill tabs to the template itself.或者您可以将预填充选项卡添加到模板本身。
  • Or (I have not tried this), instead of adding the pre-fill tabs as part of the composite template object, make an additional API call to add the pre-fill tabs by using EnvelopeDocumentTabs:create或者(我还没有尝试过),而不是将预填充选项卡添加为复合模板 object 的一部分,而是使用EnvelopeDocumentTabs:create进行额外的 API 调用以添加预填充选项卡

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM