gpt4 book ai didi

java - 如何使用 Java 中的 REST API 为 DocuSign 中的复选框定义条件字段?

转载 作者:行者123 更新时间:2023-12-01 14:28:37 25 4
gpt4 key购买 nike

我正在尝试为复选框设置条件规则,以便当复选框被“选中”时,可以签署文档。我可以在 DocuSign 的模板中执行(参见图片 - Setting the conditional rule on checkbox)

选中该复选框后,签名选项卡(和日期签名选项卡)将启用。

当我试图在代码中实现它时,我无法在复选框上设置任何条件规则。

    SignHere signHere = new SignHere();
signHere.setTabLabel("signHere");
signHere.setDocumentId("1");
signHere.setPageNumber("1");
signHere.setXPosition("113");
signHere.setYPosition("620");
signHere.setConditionalParentLabel("checkbox");
signHere.setConditionalParentValue("Checked");

DateSigned dateSigned = new DateSigned();
dateSigned.setDocumentId("1");
dateSigned.setPageNumber("1");
dateSigned.setXPosition("403");
dateSigned.setYPosition("630");

Checkbox checkbox = new Checkbox();
checkbox.setDocumentId("1");
checkbox.setPageNumber("1");
checkbox.setXPosition("130");
checkbox.setYPosition("564");
checkbox.setRequired("true");
checkbox.setTabLabel("checkbox");

我哪里错了?

最佳答案

此示例 JSON 代码如下所示,我认为您需要将 conditionalParentValue 设置为 "on" 而不是 "checked"

{
"documents": [{
"documentBase64": "<Base64>",
"documentId": "12345",
"fileExtension": "txt",
"name": "f4506t"
}],
"emailBlurb": "Email Blurb",
"emailSubject": "Email Subject",
"recipients": {
"signers": [
{
"email": "email@gmail.com",
"name": "DS SSO",
"recipientId": "1",
"tabs": {
"checkboxTabs": [{
"tabLabel": "Checkbox1",
"conditionalParentLabel": null,
"conditionalParentValue": null,
"pageNumber": 1,
"documentId": "12345",
"xPosition": 168,
"yPosition": 123
}],
"initialHereTabs": [
{
"conditionalParentLabel": "Checkbox1",
"conditionalParentValue": "on",
"documentId": "12345",
"pageNumber": "1",
"tabLabel": "Initial1",
"xPosition": "300",
"yPosition": "500",
"optional": "true"
}
],
"signHereTabs": [
{
"conditionalParentLabel": "Checkbox1",
"conditionalParentValue": "on",
"documentId": "12345",
"pageNumber": "1",
"tabLabel": "Sign1",
"xPosition": "500",
"yPosition": "400"
}
],
"dateSignedTabs": [{
"tabLabel": "Date Signed1",
"conditionalParentLabel": "Checkbox1",
"conditionalParentValue": "on",
"pageNumber": 1,
"documentId": "12345",
"xPosition": 239,
"yPosition": 198
}]
}
}
]
},
"status": "sent"
}

关于java - 如何使用 Java 中的 REST API 为 DocuSign 中的复选框定义条件字段?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48399840/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com