Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

docusignapi

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.

like image 218
muhuk Avatar asked Aug 12 '13 07:08

muhuk


2 Answers

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.

like image 158
Ergin Avatar answered Oct 20 '22 13:10

Ergin


@Ergin - The wildcard string is breaking for me if 2 tabLabels end with the same string of characters, then the last mention of the tabLabel gets mapped incorrectly to the wrong fields on the template.

So from your example:

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

So make sure you have unique TabLabels everywhere to workaround.

like image 1
nickforce Avatar answered Oct 20 '22 13:10

nickforce