2017-10-20 103 views
0

我試着用下面的代碼添加一個複選框錨標籤,但它最終只是作爲一個普通的文本字段:如何將複選框固定標籤添加到文檔?

  var inputTab = new Tab 
      { 
       Type = TabTypeCode.Custom, 
       CustomTabType = CustomTabType.Checkbox, 
       CustomTabRequired = false, 
       CustomTabRequiredSpecified = true, 
       AnchorTabItem = 
        new AnchorTab 
        { 
         AnchorTabString = "Input41-1", 
         IgnoreIfNotPresent = true, 
         IgnoreIfNotPresentSpecified = true 
        }, 
       TabLabel = "Label" + i, 
       DocumentID = "1", 
       RecipientID = recipientNum 
      }; 

      this.tabList.Add(inputTab); 
+0

您是使用SOAP還是REST DocuSign API,並且使用哪種語言開發代碼? –

+0

我正在使用SOAP DocuSign API,並使用C#將文檔發送出去。 – mgw22

+0

所以當我添加一個自定義的「收音機」選項卡時也會發生同樣的情況。它沒有顯示爲一個合適的單選按鈕,出於某種原因,它顯示爲一個小的,可調整的輸入字段。我基本上尋找一個自定義選項卡的簡單示例,它最好是複選框,但也可以是單選按鈕。我不確定我做錯了什麼。 – mgw22

回答

0

下面我有SOAP API例子,它在創造選和單選按鈕正常工作,

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.docusign.net/API/3.0"> 
     <soapenv:Header/> 
     <soapenv:Body> 
      <ns:CreateAndSendEnvelope> 
      <ns:Envelope> 
       <ns:AccountId>{accountId}</ns:AccountId> 
       <ns:Documents> 
        <ns:Document> 
        <ns:ID>32093411</ns:ID> 
        <ns:Name>DocName</ns:Name> 
        <ns:PDFBytes>{pdfBytes}</ns:PDFBytes> 
        <ns:FileExtension>pdf</ns:FileExtension> 
       </ns:Document> 
       </ns:Documents> 
       <ns:Recipients> 
        <ns:Recipient> 
         <ns:ID>45399085</ns:ID> 
         <ns:UserName>Test Radio Name</ns:UserName> 
         <ns:Email>[email protected]</ns:Email> 
         <ns:Type>Signer</ns:Type> 
         <ns:RoutingOrder>1</ns:RoutingOrder> 
        </ns:Recipient> 
       </ns:Recipients> 
       <ns:Tabs> 
       <ns:Tab> 
        <ns:RecipientID>45399085</ns:RecipientID> 
        <ns:AnchorTabItem> 
         <ns:AnchorTabString>/TextHereClient/</ns:AnchorTabString> 
        </ns:AnchorTabItem> 
        <ns:Type>Custom</ns:Type> 
        <ns:TabLabel>Checkbox1</ns:TabLabel> 
        <ns:CustomTabType>Checkbox</ns:CustomTabType> 
       </ns:Tab> 
       <ns:Tab> 
        <ns:RecipientID>45399085</ns:RecipientID> 
        <ns:AnchorTabItem> 
         <ns:AnchorTabString>/SignHereAdvisor/</ns:AnchorTabString> 
        </ns:AnchorTabItem> 
        <ns:Type>Custom</ns:Type> 
        <ns:TabLabel>Checkbox2</ns:TabLabel> 
        <ns:CustomTabType>Checkbox</ns:CustomTabType> 
       </ns:Tab> 
       <ns:Tab> 
        <ns:RecipientID>45399085</ns:RecipientID> 
        <ns:AnchorTabItem> 
         <ns:AnchorTabString>Test Anchor</ns:AnchorTabString> 
        </ns:AnchorTabItem> 
        <ns:Type>Custom</ns:Type> 
        <ns:Name>Radio</ns:Name> 
        <ns:TabLabel>Radio Group1</ns:TabLabel> 
        <ns:CustomTabType>Radio</ns:CustomTabType> 
       </ns:Tab> 
       <ns:Tab> 
        <ns:RecipientID>45399085</ns:RecipientID> 
        <ns:AnchorTabItem> 
         <ns:AnchorTabString>/SignHereClient/</ns:AnchorTabString> 
        </ns:AnchorTabItem> 
        <ns:Type>Custom</ns:Type> 
        <ns:Name>Radio</ns:Name> 
        <ns:TabLabel>Radio Group1</ns:TabLabel> 
        <ns:CustomTabType>Radio</ns:CustomTabType> 
       </ns:Tab> 
      </ns:Tabs> 
       <ns:Subject>Email Subject Radio</ns:Subject> 
       <ns:EmailBlurb>Email Blurb Radio</ns:EmailBlurb> 
      </ns:Envelope> 
      </ns:CreateAndSendEnvelope> 
     </soapenv:Body> 
    </soapenv:Envelope> 
+0

我在看到你的SOAP之後,發現我錯過了什麼。謝謝阿米特! CustomTabTypeSpecified = TRUE, – mgw22

+0

然後你能接受它作爲一個答案? –

+0

當然。對不起,我不知道該怎麼做。 – mgw22

相關問題