breakoutbox
breakoutbox

Reputation: 75

How to pre-fill data tag with a date mask

I am creating an envelope using the RES API and have a tag on the document to capture a date (not the date signed, another recipient-supplied date). I can successfully pre-fill the value of this when the mask on the field is Text, but when I switch it to be Date it's blank. "DOBField" is the label of the tag below. Anyone know what I'm doing wrong here?

{
    "accountId": "xxxxxx",
    "emailSubject": "DocuSign API - Embedded Signing Example",
    "compositeTemplates": [
        {
            "serverTemplates": [
                {
                    "sequence": 1,
                    "templateId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx"
                }
            ],
            "inlineTemplates": [
                {
                    "sequence": 1,
                    "recipients": {
                        "signers": [
                            {
                                "email": "[email protected]",
                                "name": "Rick James",
                                "clientUserId": "3",
                                "recipientId": 0,
                                "roleName": "Signer"
                            }
                        ]
                    }
                }
            ]
        },
        {
            "serverTemplates": [
                {
                    "sequence": 1,
                    "templateId": "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
                }
            ],
            "inlineTemplates": [
                {
                    "sequence": 1,
                    "recipients": {
                        "signers": [
                            {
                                "email": "[email protected]",
                                "name": "Rick James",
                                "clientUserId": "3",
                                "recipientId": 0,
                                "roleName": "Signer",
                                "tabs": {
                                    "textTabs": [
                                        {
                                            "tabLabel": "DOBField",
                                            "value": "12/24/1976"
                                        }
                                    ]
                                }
                            }
                        ]
                    }
                }
            ]
        }
    ],
    "enableWetSign": false,
    "status": "sent"
}

enter image description here

Upvotes: 0

Views: 222

Answers (1)

Kim Brandl
Kim Brandl

Reputation: 13490

If you've specified mask of "Date" for the field, then it's no longer a textTab -- it's now a dateTab. So, try changing textTabs to dateTabs in your API request. i.e., the tabs portion of the request will look like this:

"tabs": {
    "dateTabs": [
        {
            "tabLabel": "DOBField",
            "value": "12/24/1976"
        }
    ]
}

Upvotes: 1

Related Questions