DocuSign: wymagane pole wyboru

Sep 07 2020

Próbuję utworzyć kopertę w docusign, przy czym pole wyboru będzie obowiązkowe. Próbowałem to zastosować, używając karty Grupy kart. Poniżej moja prośba. Mogę utworzyć dokument, ale pola wyboru są nadal opcjonalne. Nie jestem pewien, co jest nie tak w zapytaniu: Sprawdź. Dziękuję Ci.

{
    "documents":[
            {
                "documentBase64":"<pdffile>",
                "documentId":"1",
                "fileExtension":"pdf",
                "name":"Document_Name"
            }
        ],
    "emailSubject":"Some Email Subject",
    "recipients":{
        "signers":[
            {
                "email":"[email protected]",
                "name":"Some People",
                "recipientId":"4250",
                "routingOrder":"1",
                "tabs":{
                    "signHereTabs":[
                        {
                            "anchorString":"PLEASE SIGN HERE",
                            "anchorXOffset":"0",
                            "anchorYOffset":"1.5",
                            "anchorUnits":"cms"
                        }
                    ],
                    "checkboxTabs":[
                        {
                            "tabLabel":"checkbox1",
                            "selected":"false",
                            "required":"false",
                            "documentId":"1",
                            "recipientId":"1",
                            "anchorString":"[x]",
                            "anchorXOffset":"0",
                            "anchorYOffset":"0",
                            "anchorUnits":"cms",
                            "tabGroupLabels":["Checkbox Group"]
                        },
                        {
                            "tabLabel":"checkbox2",
                            "selected":"false",
                            "required":"false",
                            "documentId":"1",
                            "recipientId":"1",
                            "anchorString":"[x]",
                            "anchorXOffset":"0",
                            "anchorYOffset":"1",
                            "anchorUnits":"cms",
                            "tabGroupLabels":["Checkbox Group"]
                        }
                    ],
                    "tabGroups":[
                        {
                            "recipientId":"1",
                            "tabLabel":"Check Boxes",
                            "groupLabel":"Checkbox Group",
                            "groupRule":"SelectAtMost",
                            "maximumAllowed" :"1",
                            "minimumRequired":"0",
                            "validationMessage":"Please check a box",
                            "tabScope":"Document",
                            "locked":"false"
                        }
                    ]
                }
            }
        ]
    },
    "status":"sent"
}

AKTUALIZACJA:

Próbowałem tego w mojej prośbie i nadal pole wyboru pozostało opcjonalne.

"tabs":{
    "signHereTabs":[
        {
            "anchorString":"PLEASE SIGN HERE",
            "anchorXOffset":"0",
            "anchorYOffset":"1.5",
            "anchorUnits":"cms"
        }
    ],
    "checkboxTabs":[
        {
            "anchorString":"[x]",
            "anchorXOffset":"0",
            "anchorYOffset":"0",
            "anchorUnits":"cms",
            "tabGroupLabels":[
                "Checkbox Group"
            ]
        }
    ],
    "tabGroups":[
        {
            "groupLabel":"Checkbox Group",
            "groupRule":"SelectAtLeast",
            "maximumAllowed":"1",
            "minimumRequired":"1",
            "validationMessage":"Please check a box",
            "tabScope":"document"
        }
    ]
}

Używam wersji 2.1, /restapi/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}

Z góry dziękuję.

Odpowiedzi

1 LarryK Sep 07 2020 at 15:51

requiredAtrybut do wyboru nie ma zastosowania. Zamiast tego utwórz tabGroupdla pola wyboru lub pól wyboru. W ten sposób możesz wymagać zaznaczenia pola wyboru lub wymagać zaznaczenia jednego z wielu pól wyboru itp.

Przykład: jedno wymagane pole wyboru

{
    "emailSubject": "Please sign the attached document",
    "status": "sent",
    "documents": [
      {
        "documentBase64":"<pdffile>",
        "name": "Example document",
        "fileExtension": "pdf",
        "documentId": "1"
      }
    ],
    "recipients": {
      "signers": [
        {
          "email": "[email protected]",
          "name": "Signer's name",
          "recipientId": "1",
          "clientUserId": "1000",
          "tabs": {
            "signHereTabs": [
              {
                "anchorString": "/sig1/",
                "anchorXOffset": "20",
                "anchorUnits": "pixels"
              }
            ],
            "checkboxTabs": [
              {
                "anchorString": "/sig1/",
                "anchorXOffset": "180",
                "anchorUnits": "pixels",
                "tabGroupLabels": [
                  "checkbox group"
                ]
              }
            ],
            "tabGroups": [
              {
                "groupLabel": "checkbox group",
                "groupRule": "SelectAtLeast",
                "minimumRequired": "1",
                "maximumAllowed": "1",
                "validationMessage": "Please check to indicate your agreement",
                "tabScope": "document",
                "pageNumber": "1",
                "documentId": "1"
              }
            ]
          }
        }
      ]
    }
}