Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
446 views
in Technique[技术] by (71.8m points)

docusignapi - DocuSign: How to prefill multiple text tabs with the same label?

I have multiple text tabs that all have the exact same label in a template. When I send recipient tab data to prefill these only the first one is prefilled, rest of them are empty.

I have found this support ticket. But it contains contradicting info:

Yes I believe you do need to set the value 10 times (one for each text tab),
...
So if you give them all the same label and make them editable (by setting "locked" to false) then when a recipient types a value  into one text box ALL of them will get updated with that value. 

If they're all recognized as one, why do the API need to send the same data 10 times? If it sends the info 5 times, which tabs are filled? The first 5? Any 5 of them randomly?

Please note that I can get text tabs with unique labels prefilled.

EDIT:

Here is the JSON dump of the request:

{
  "compositeTemplates": null, 
  "status": "sent", 
  "allowReassign": false, 
  "allowRecipientRecursion": false, 
  "templateRoles": [
    {
      "name": "Atamert Olcgen", 
      "tabs": {
        "radioGroupTabs": [], 
        "textTabs": [
          ...
          {
            "name": "Text", 
            "value": "<EMAIL1>", 
            "tabLabel": "Email"
          }, 
          ...
          {
            "name": "Text", 
            "value": "Atamert Olcgen", 
            "tabLabel": "FullName"
          }, 
          ...
        ], 
        "checkboxTabs": []
      }, 
      "recipientId": "1", 
      "accessCode": null, 
      "clientUserId": "******", 
      "roleName": "Client", 
      "emailNotification": null, 
      "email": "<EMAIL1>"
    }, 
    {
      "name": "*****",
      "tabs": {
      ... // Secondary signer, mostly empty
      }, 
      "recipientId": "2", 
      "accessCode": null, 
      "clientUserId": null, 
      "roleName": "!", 
      "emailNotification": null, 
      "email": "<EMAIL2>"
    }, 
    {
      "name": "******", 
      "tabs": {
        "radioGroupTabs": [], 
        "textTabs": [], 
        "checkboxTabs": []
      }, 
      "recipientId": "1", 
      "accessCode": null, 
      "clientUserId": null, 
      "roleName": "EmailOnlyRecipient", 
      "emailNotification": null, 
      "email": "<EMAIL3>"
    }
  ], 
  "enableWetSign": false, 
  "signingLocation": "Online", 
  "eventNotification": null, 
  "enforceSignerVisibility": false, 
  "brandId": "", 
  "allowMarkup": false, 
  "envelopeIdStamping": false, 
  "asynchronous": false, 
  "templateId": "<TEMPLATE_ID>", 
  "emailBlurb": "", 
  "customFields": null, 
  "authoritativeCopy": false, 
  "emailSubject": "<PRODUCT> - Secure Authorization Document", 
  "autoNavigation": false
}

(I have removed some sensitive information)

And here is the JSON response:

{
  "envelopeId": "******",
  "uri": "/envelopes/******",
  "statusDateTime": "2013-08-12T10:25:00.7159991Z",
  "status": "sent"
}

As I said above the first FullName tab is prefilled, subsequent ones are empty.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The post you referenced is now out of date - there's actually a trick you need to do when you have multiple tabs with the same label that you want to prefill with the same value.

Basically if you have several tabs with the same tabLabel and you'd like all of them to start out with the same initial value then you need to prefix the tabLabel with the wildcard string

\* 

For instance, let's say you have a social security tab that you've added to your document in multiple places called "SocialSecurityTab". To fill ALL of the textTabs that contain "SocialSecurityTab" as their tabLabel use the following JSON:

"textTabs": [
      {
        "tabLabel": "\*SocialSecurityTab",
        "value": "012-34-5678"
      }

It's important to not forget both backslash () characters, and also make sure you're not using a system (such as Salesforce) that might strip one of backslashes out for various reasons.

Documentation

See the Automatically Populating Tabs documentation for more info.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...