我需要将自定义表单数据附加到 HelloSign api 模板。表单在 HelloSign 页面之前填写 php 表单。我需要获取要在 HelloSign 模板中显示的表单数据的所有详细信息。
<form name="hellosign" method="post">
Name:<input type="text" name="name">
Phone: <input type="text" name="phone">
Email: <input type="text" name="email">
<input type="submit" value="submit">
</form>
<?php $client = new HelloSign\Client('62ae8b50d5293a72ae0aa31ef0f586d1fcf5c89707b9e68b906dd64864');
$request = new HelloSign\SignatureRequest;
$request->enableTestMode();
$request->setRequesterEmail('prasad@test.com');
$request->addFile('trxade.pdf');
$client_id = '0005fc6cf93ce7ce6116778555661';
$draft_request = new HelloSign\UnclaimedDraft($request, $client_id);
$draft_request->setIsForEmbeddedSigning(true);
$response = $client->createUnclaimedDraft($draft_request);
$claim_url = $draft_request->getClaimUrl();
foreach ($response as $key => $value) {
if($key === 'signature_request_id')
{
echo $requestId =$value;echo "<br/>";
}
}
echo $requestId;
<script type="text/javascript" src="https://s3.amazonaws.com/cdn.hellosign.com/public/js/hellosign-embedded.LATEST.min.js"></script>
<script>
HelloSign.init("0005fc6cf93ce7ce6116778555661");
HelloSign.open({
url: "<?= $claim_url;?>",
allowCancel: true,
skipDomainVerification:true
});
</script>