Said Kaldybaev
Said Kaldybaev

Reputation: 10002

How do I pre-populate the values of DocuSign tabs?

Right now I'm sending a request body that has Data Field tabs that look like this:

"tabs": {
"textTabs": [
    {
      "tabLabel": "Data Field 1",
      "xPosition": "200",
      "yPosition": "200",
      "documentId": "1",
      "pageNumber": "1"
    }
  ]
}

Is there a way I can populate the initial value of the field so that it starts out with specific data for each recipient?

Upvotes: 0

Views: 1663

Answers (1)

Ergin
Ergin

Reputation: 9356

Yes you just have to set the value property.

Something like this should work:

"tabs": {
"textTabs": [
    {
      "tabLabel": "Data Field 1",
      "value": "Initial data goes here...",
      "xPosition": "200",
      "yPosition": "200",
      "documentId": "1",
      "pageNumber": "1"
    }
  ]
}

We did a webinar on templates back in April and the second example we did showed how to populate Data Fields in your envelopes, see example #2 of this Gist: https://github.com/Ergin008/DocuSign-REST-API-Webinar-April2013

Additionally, if you are using XML formatted request bodies instead of JSON, you can use the following to pre-fill your tabs:

<tabs>
    <textTabs>
        <text>
            <tabLabel>DataField1</tabLabel>
            <value>Initial Data Goes Here</value>
            <xPosition>200</xPosition>
            <yPosition>200</yPosition>
            <documentId>1</documentId>
            <pageNumber>1</pageNumber>
        </text>
    </textTabs>
</tabs>

Upvotes: 1

Related Questions