Docusign公司字段未显示-PHP API

Docusign公司字段未显示-PHP API,php,soap,docusignapi,Php,Soap,Docusignapi,我试图在DocuSign中的文档上实现CompanyTab,但它没有出现。当设置为TextTab时,它可以工作,但我在其他地方使用它来显示邮政编码列表 我曾尝试将信息放入多维数组,试图将其与文本选项卡一起使用,但这似乎打破了页面。我似乎找不到这方面的任何指南 请在下面查找代码示例: $signHere = new \DocuSign\eSign\Model\SignHere(); $signHere->setXPosition("100"); $signHere->setYPosit

我试图在DocuSign中的文档上实现CompanyTab,但它没有出现。当设置为TextTab时,它可以工作,但我在其他地方使用它来显示邮政编码列表

我曾尝试将信息放入多维数组,试图将其与文本选项卡一起使用,但这似乎打破了页面。我似乎找不到这方面的任何指南

请在下面查找代码示例:

$signHere = new \DocuSign\eSign\Model\SignHere();
$signHere->setXPosition("100");
$signHere->setYPosition("400");
$signHere->setDocumentId("1");
$signHere->setPageNumber("1");
$signHere->setRecipientId("1");
// add the signature tab to the envelope's list of tabs
$tabs = new DocuSign\eSign\Model\Tabs();
$tabs->setSignHereTabs(array($signHere));

// add name tab
$nameTab = new \DocuSign\eSign\Model\Text();
$nameTab->setDocumentId("1");
$nameTab->setRecipientId("1");
$nameTab->setPageNumber("1");
$nameTab->setName("name");
$nameTab->setTabLabel("Name");
$nameTab->setValue($name[0]);
$nameTab->setLocked("true");
$nameTab->setXPosition("100");
$nameTab->setYPosition("150"); 
// add the name tab to the envelope's list of tabs
$tabs->setFirstNameTabs(array($nameTab));

// add email tab
$emailTab = new DocuSign\eSign\Model\Text();
$emailTab->setDocumentId("1");
$emailTab->setRecipientId("1");
$emailTab->setPageNumber("1");
$emailTab->setName("email");
$emailTab->setTabLabel("Email");
$emailTab->setValue($_SESSION['email']);
$emailTab->setLocked("true");
$emailTab->setXPosition("100");
$emailTab->setYPosition("200"); 
// add the email tab to the envelope's list of tabs
$tabs->setEmailAddressTabs(array($emailTab));

// add company tab
$firmTab = new DocuSign\eSign\Model\Text();
$firmTab->setDocumentId("1");
$firmTab->setRecipientId("1");
$firmTab->setPageNumber("1");
$firmTab->setName("company");
$firmTab->setTabLabel("Company");
$firmTab->setValue($_SESSION['company']);
$firmTab->setLocked("true");
$firmTab->setXPosition("100");
$firmTab->setYPosition("250"); 
// add the company tab to the envelope's list of tabs
$tabs->setCompanyTabs(array($firmTab));

// add phone tab
$phoneTab = new DocuSign\eSign\Model\Number();
$phoneTab->setDocumentId("1");
$phoneTab->setRecipientId("1");
$phoneTab->setPageNumber("1");
$phoneTab->setName("phone");
$phoneTab->setTabLabel("Phone");
$phoneTab->setValue($_SESSION['phone']);
$phoneTab->setLocked("true");
$phoneTab->setXPosition("100");
$phoneTab->setYPosition("300"); 
// add the phone tab to the envelope's list of tabs
$tabs->setNumberTabs(array($phoneTab));

// add postcode tab
$postcodeTab = new DocuSign\eSign\Model\Text();
$postcodeTab->setDocumentId("1");
$postcodeTab->setRecipientId("1");
$postcodeTab->setPageNumber("1");
$postcodeTab->setName("postcodes");
$postcodeTab->setTabLabel("Postcodes");
$postcodeTab->setValue($postcodes);
$postcodeTab->setLocked("true");
$postcodeTab->setXPosition("100");
$postcodeTab->setYPosition("350"); 
// add the postcodes tab to the envelope's list of tabs
$tabs->setTextTabs(array($postcodeTab));

谢谢。

如果您使用多个文本选项卡,请确保只调用一次
setTextTabs()
函数

  // add company tab
  $firmTab = new DocuSign\eSign\Model\Text();
  $firmTab->setDocumentId("1");
  $firmTab->setRecipientId("1");
  $firmTab->setPageNumber("1");
  $firmTab->setName("company");
  $firmTab->setTabLabel("Company");
  $firmTab->setLocked("true");
  $firmTab->setXPosition("71");
  $firmTab->setYPosition("250"); 
  $firmTab->setWidth("80");
  $firmTab->setValue($_SESSION['company']); 

  // add postcode tab
  $postcodeTab = new DocuSign\eSign\Model\Text();
  $postcodeTab->setDocumentId("1");
  $postcodeTab->setRecipientId("1");
  $postcodeTab->setPageNumber("1");
  $postcodeTab->setName("postcodes");
  $postcodeTab->setTabLabel("Postcodes");
  $postcodeTab->setValue($postcodes);
  $postcodeTab->setLocked("true");
  $postcodeTab->setXPosition("66");
  $postcodeTab->setYPosition("312"); 
  $postcodeTab->setHeight("226");
  $postcodeTab->setWidth("500");
  // add the Company/postcodes tab to the envelope's list of tabs
  $tabs->setTextTabs(array($firmTab, $postcodeTab));

您正在生成文本对象并将它们注入到不同的选项卡类型中。(DocuSign中的EmailAddress选项卡会自动填充收件人的电子邮件地址。如果您希望此字段可填充,可以使用文本选项卡。)可以在setTextTabs数组中分配多个文本选项卡。嗨,Andrew,你能用PHP提供一个例子吗?嗨,CodingDawg,谢谢你的帮助。我已经尝试修改代码,如上图所示,但仍然没有显示。谢谢。注意,我已经添加了$firmTab->setValue($_SESSION['company']);因为这似乎丢失了,但仍不起作用。您无法在“公司”选项卡上设置值。只有签名者才能输入值。如果签名者已经有DocuSign帐户,并且已在签名者首选项中填写了公司名称,则该值将自动填充。还请尝试设置“公司”选项卡的宽度。标签可能在那里,但可能太小,你看不见。我已经修改了我的答案。谢谢更新。我已按建议设置了宽度,但没有显示任何内容。这可能是因为我使用的是沙盒帐户吗?我真的很想用预填充的数据填充多个选项卡。目前总共还有三个。正如Andrew所建议的,我相信这可以通过setTextTabs数组实现,但我不确定如何通过PHP客户端实现。