We are using AnchorTags in our documents to place signature elements into PDF documents. So far, signature elements like "SignHere" are working as expected, one click per signature, and being placed correctly into to the documents. We are now attempting to add checkboxes to these documents with AnchorTags and we are running in to some issues with how the checkboxes are 1. labeled and 2. grouped.
According to the DocuSign documentation:
For each group of placed fields, the data label is the same for all fields in the group. This is important for field types which the recipient fills out, such as text fields. If you leave the data labels the same, when the recipient completes any one of the fields in the group, all the other like fields are automatically populated with the same data.
Looking at creating checkboxes with the API, we can use a JSON object like this to assign string values in the document the checkbox tag. This will find the string BOR_2_CHK and place a checkbox at every instance.
PUT /v2/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/tabs
{
"checkboxTabs": [
{
"name": "",
"tabLabel": "Checkbox1",
"selected": "false",
"shared": "false",
"required": "false",
"locked": "false",
"documentId": "46688109",
"recipientId": "50556292",
"anchorString": "BOR_2_CHK",
"anchorXOffset": "0",
"anchorYOffset": "0",
"anchorUnits": "pixels",
"anchorCaseSensitive": "false",
"anchorMatchWholeWord": "true",
"anchorHorizontalAlignment": "left",
"tabId": ""
}]}
This effect of this call on a document that has more than one matching AnchorString is that a checkbox will be placed at every matching location, when any of the checkboxes are checked, they are all checked. This is easily reproducible in the DocuSign web site by assigning an "AutoPlace" rule to the document for checkboxes.
This is where things get wierd, when a document that uses AnchorTags to place checkboxes, and there is more than once instance of the AnchorString in the document, the signing ceremony will display multiple checkboxes, but the API only reports that there is a single checkbox tab on the document.
In the following JSON example, there were 3 instances of 2 anchor strings in the document, so that is 6 checkboxes total in the document.
{
"checkboxTabs": [
{
"name": "",
"tabLabel": "Checkbox 0daa7d08-db75-43da-bcee-01a6451a34a5",
"selected": "false",
"shared": "false",
"required": "false",
"locked": "false",
"documentId": "46688109",
"recipientId": "50556292",
"pageNumber": "1",
"xPosition": "74",
"yPosition": "253",
"anchorString": "BOR_2_CHK",
"anchorXOffset": "0",
"anchorYOffset": "0",
"anchorUnits": "pixels",
"anchorCaseSensitive": "false",
"anchorMatchWholeWord": "true",
"anchorHorizontalAlignment": "left",
"tabId": "d87fb774-2b4b-4c86-95b3-e5a730066874"
},
{
"name": "",
"tabLabel": "BOR_1_CHK",
"selected": "false",
"shared": "false",
"required": "false",
"locked": "false",
"documentId": "46688109",
"recipientId": "50556292",
"pageNumber": "1",
"xPosition": "74",
"yPosition": "73",
"anchorString": "BOR_1_CHK",
"anchorXOffset": "0",
"anchorYOffset": "0",
"anchorUnits": "pixels",
"anchorCaseSensitive": "false",
"anchorMatchWholeWord": "true",
"anchorHorizontalAlignment": "left",
"tabId": "966c4273-d4a4-4acd-8ff5-08b27ba69c13"
}
]
}
My question is, how using the DocuSign REST API can I ungroup and make work independently all 6 checkboxes on the document?
The DocuSign website has a button available as part of AutoPlace called "Ungroup", when this is clicked in the UI, the API then shows checkbox tabs for each checkbox that was assigned to the AnchorString, however the "ancorString" attributes have all been stripped from the objects that were ungrouped. I have searched the DocuSign API documentation as well as StackOverflow and have not found any "Ungroup" method or attribute that I can use to accomplish this.
The only way I have found to ungroup the checkboxes is to remove the anchorTag attributes to the object using the EnvelopeTabs:Update method to set them to null. This approach is limited since when I query a list of tabs on the envelope, each group checkbox tabs is only shown as a single object therefore to ungroup 3 checkboxes, I must execute 3 updates, and 2 gets as the tabID for the 2nd and 3rd cheboxes are only available after its predecessor has been altered.
Commonly our documents can have upward of 6 signers, each having 40 or more checkbox elements in a document, that is 240 GET/PUT requests for a single envelope, and would hit the DocuSign rate limit after 4 envelopes.
Thanks in advance for your help,