DOCUSIGN-在docusign签名过程中获取其他选项卡或字段进行填充

时间:2020-07-13 20:03:28

标签: docusignapi

这是我正在使用的一些PHP代码,可以毫无问题地抓住用户的签名。但是,当我尝试为“ datestart”添加另一个字段时,Docusign Demo中的PDF文档没有任何内容显示。因此,基本上,除了签名名和电子邮件之外,我无法在Docusign签名中填充其他任何字段,这涉及到签名部分。我在代码中做错了吗?我使用了docusign提供的代码示例,但是没有运气。

更多见解:我只是试图填充docusign提供的基本文本字段。现在没什么。

 # The signer object
    $signer = new DocuSign\eSign\Model\Signer([ 
        'email' => $signerEmail, 'name' => $signerName, 'recipient_id' => "1", 'routing_order' => "1",
        'client_user_id' => $clientUserId # Setting the client_user_id marks the signer as embedded
    ]);

    $signHere = new DocuSign\eSign\Model\SignHere([ # DocuSign SignHere field/tab
        'document_id' => '1', 
        'page_number' => '2', 
        'recipient_id' => '1', 
        'tab_label' => 'Signaturebottom', 
        'x_position' => '71', 
        'y_position' => '629'
    ]);


//Here is the tab+text I am having troubles getting to show up below within my docusign pdf
//Just need extra fields to populate like dates and other peoples names and mailing address etc.
$tripdates = new DocuSign\eSign\Model\Text([
            'anchor_string' => '/dateone/', 'anchor_units' => 'pixels',
            'anchor_y_offset' => '409', 'anchor_x_offset' => '105',
            'font' => "helvetica", 'font_size' => "size11",
            'bold' => 'true', 'value' => "test",
            'locked' => 'true', # mark the field as readonly
            'tab_id' => 'datestart', 'tab_label' => 'datestart'
        ]);


    # Add the tabs to the signer object
    # The Tabs object wants arrays of the different field/tab types
    $signer->setTabs(new DocuSign\eSign\Model\Tabs(
    ['sign_here_tabs' => [$signHere],
    'text_tabs' => [$tripdates]
    ]));
    

    # Next, create the top level envelope definition and populate it.
    $envelopeDefinition = new DocuSign\eSign\Model\EnvelopeDefinition([
        'email_subject' => "Please sign this document",
        'documents' => [$document], # The order in the docs array determines the order in the envelope
        'recipients' => new DocuSign\eSign\Model\Recipients(['signers' => [$signer]]), # The Recipients object wants arrays for each recipient type
        'status' => "sent" # requests that the envelope be created and sent.
    ]);

1 个答案:

答案 0 :(得分:0)

可能是因为您错过了这些:

'document_id' => '1', 
'page_number' => '2', 
'recipient_id' => '1', 

您使用的是signerTab而不是textTab?