Hi,
I´m creatin a envelope with 2 documents using the PHP SDK. Each document requires the signature of a signatory and a witness (the same signatory and the same witness for both documents).
When I send it, the signatory receives it correctly, but a window appears asking him to fill in the witness twice (as if there were two witnesses), and therefore he cannot send it to just one person to be a witness.
I am using the code below. If anyone can help me, I would be grateful.
//Signer
$sign_here_tab = new SignHere([
'anchor_string' => "**sign_".$signer->id."**",
'anchor_units' => "pixels",
'anchor_x_offset' => "0",
'anchor_y_offset' => "0"
]);
$sign_here_tabs = [$sign_here_tab];
$tabs = new Tabs([
'sign_here_tabs' => $sign_here_tabs
]);
$sig = new Signer([
'email' => $signer->email,
'name' => $signer->name,
'recipient_id' => $r_id,
'tabs' => $tabs,
'email_notification' => new RecipientEmailNotification([
'email_subject' => 'Assinatura de novo contrato Arklok',
'email_body' => 'Olá '.$signer->name.' você está recebendo um documento para ser assinado como contratante'
])
]);
$signers[] = $sig;
//Witness
$sign_here_tab = new SignHere([
'anchor_string' => "**sign_".$witness->id."**",
'anchor_units' => "pixels",
'anchor_x_offset' => "0",
'anchor_y_offset' => "0"
]);
$sign_here_tabs = [$sign_here_tab];
$tabs = new Tabs([
'sign_here_tabs' => $sign_here_tabs
]);
$wit = new Witness([
'email' => $witness->email,
'name' => $witness->name,
'witness_for' => $s_id,
'recipient_id' => $r_id,
'tabs' => $tabs,
'email_notification' => new RecipientEmailNotification([
'email_subject' => 'Assinatura de novo contrato Arklok',
'email_body' => 'Olá '.$witness->name.' você está recebendo um documento para ser assinado como testemunha'
])
]);
$witnesses[] = $wit;
// Recipients
$recipients = new Recipients(['signers' => $signers,'witnesses'=>$witnesses]);
//Document 1
$composite_template_contract = new CompositeTemplate([
'composite_template_id' => "1",
'document' => $doc_contract,
'inline_templates' => [new InlineTemplate([
'recipients' => $recipients,
'sequence' => "1"
])]
]);
// Document 2
$composite_template_term = new CompositeTemplate([
'composite_template_id' => "2",
'document' => $doc_term,
'inline_templates' => [new InlineTemplate([
'recipients' => $recipients,
'sequence' => "2"
])]
]);
$composite_templates = [$composite_template_contract,$composite_template_term];
$envelope_definition = new EnvelopeDefinition([
'composite_templates' => $composite_templates,
'email_subject' => "Assinatura de documento Arklok",
'email_blurb' => 'Documento para assinar',
'status' => "sent"
]);