且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

无法将值传递到文档模板

更新时间:2023-08-26 19:22:10

您只需使用JSON请求属性(或XML)指定 tabLabel value 属性。例如,这将填充2个数据字段,其中一个名为 ApplicantName,第二个为 ApplicantSSN ...

You just specify in your JSON request properties (or XML) by using the tabLabel and value properties. For instance, this would populate 2 data fields, one named "ApplicantName" the second "ApplicantSSN"...

{
    "accountId": "221765",
    "emailSubject": "DocuSign Templates Webinar - Example 2",
    "emailBlurb": "Example #2 - Dynamically Populate Form Fields",
    "templateId": "44D9E888-3D86-4186-8EE9-7071BC87A0DA",
    "templateRoles": [
        {
            "email": "jondow@email.com",
            "name": "Jon Dow",
            "roleName": "RoleOne",
            "tabs": {
                "textTabs": [
                    {
                        "tabLabel": "ApplicantName",
                        "value": "John Doe"
                    },
                    {
                        "tabLabel": "ApplicantSSN",
                        "value": "12-345-6789"
                    }
                ]
            }
        }
    ],
    "status": "sent"
}

要获得完整的代码演练,可以将上述内容组合在一起JSON,其中包含示例代码演练之一:

For a full code walkthrough you can combine the above JSON with one of the sample code walkthroughs here:

DocuSign API演练#1