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

2

8

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.

Maurili answered 12/8, 2013 at 7:12 Comment(0)
C
17

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.

Cornerwise answered 12/8, 2013 at 21:53 Comment(4)
Thanks this solved the issue. But why wasn't this the default behavior? All the devs I mentioned this issue have expressed puzzlement. Why should anyone give the same name to two tabs if they don't expect them to be filled with the same value?Maurili
I agree @Maurili this is poorly designed, and not documented well in their API Docs.Pannell
For those who are curious to see this in the documentation itself. It can be found here in DocuSign API DocsTillie
I agree that DocuSign has horrible documentationAntiicer
S
1

@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.

Smock answered 14/7, 2016 at 18:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.