0
votes

I added checkboxTab in envelopedefinition. but still did not see check box in document. what am I doing wrong? I want to add signHere, Initial and checkbox in PDF file.

<envelopeDefinition xmlns="http://www.docusign.com/restapi">
   <emailSubject>cvCurrentPORSignatureRequest.EmailSubjectOut</emailSubject>
   <emailBlurb>cvCurrentPORSignatureRequest.EmailBodyOut</emailBlurb>
   <status>sent</status>
   <documents>lvMultiDocumentNamesXMLText</documents>
   <recipients>
       <signers>
           <signer>
               <recipientId>1</recipientId>
               <email>cvCurrentPORSignatureRequest.RecipientEmailAddress</email>
               <name>cvCurrentPORSignatureRequest.RecipientNameOut</name>
               <tabs>
                   <signHereTabs>...</signHereTabs>
                   <initialHereTabs>...</initialHereTabs>
                   <CheckBoxTabs>
                       <documentId>1</documentId>
                       <CheckBox>
                           <anchorString>ShipTo:</anchorString>
                           <anchorXOffset>1</anchorXOffset>
                           <anchorYOffset>2</anchorYOffset>
                           <anchorUnits>Inches</anchorUnits>
                           <xPosition>2</xPosition>
                           <yPosition>2</yPosition>
                           <name>CheckBox</name>
                           <DocumentID>1</DocumentID>
                           <Selected>true</Selected>
                           <pageNumber>2</pageNumber>
                           <Shared>false</Shared>
                           <tabLabel>CheckBoxLabel1</tabLabel>
                           <anchorIgnoreIfNotPresent>false</anchorIgnoreIfNotPresent>
                           <templateLocked>False</templateLocked>
                       </CheckBox>
                   </CheckBoxTabs>
               </tabs>
           </signer>
       </signers>
   </recipients>
</envelopeDefinition>
2
Couple of items to help troubleshoot off the bat: 1) confirm that the actual text is present on the document. 2) ensure that the DS control does not get placed off the page. - Luis Scott
1), it does has actual text 'Ship to:', 2) it's not DS Control, It was packed in XML body in envelope. - DuYanPiLi

2 Answers

1
votes

You've got some problems with your XML. I haven't fully checked it all but I can at least see one problem with your definition for the checkbox. Right now you have:

<CheckBoxTabs>
<documentId>1</documentId>
<CheckBox>
   <anchorString>ShipTo:</anchorString>
   <anchorXOffset>1</anchorXOffset>
   ...

You need to move the <documentId> element into each individual checkBox tab which in this case you have only one. You also need to get the casing right on the <checkboxTabs> and checkbox tags.

<checkboxTabs>
    <checkbox>
    <documentId>1</documentId>
    <anchorString>ShipTo:</anchorString>
    <anchorXOffset>1</anchorXOffset>
    ...

I just ran a test and the following worked perfectly for me:

<envelopeDefinition>
    <emailSubject>DocuSign API - Checkbox test, no tab label</emailSubject>
    <status>sent</status>
    <documents>
        <document>
            <documentId>1</documentId>
            <name>test.pdf</name>
        </document>
    </documents>
    <recipients>
        <signers>
            <signer>
                <recipientId>1</recipientId>
                <email>[email protected]</email>
                <name>John Doe</name>
                <tabs>
                    <checkboxTabs>
                        <checkbox>
                            <xPosition>100</xPosition>
                            <yPosition>100</yPosition>
                            <documentId>1</documentId>
                            <pageNumber>1</pageNumber>
                        </checkbox>
                    </checkboxTabs>
                </tabs>
            </signer>
        </signers>
    </recipients>
</envelopeDefinition>
0
votes

In addition to Ergin's answer, I notice that you've got large offsets (1 and 2 inches).

To debug, first remove all offsets. Also minimize the anchor text in case the document text includes extra characters. Eg, try with anchor text of "Ship".

Or even better, start with no anchor text, check that the check box is as you'd expect, then build from there.