[英]How to append custom form data to HelloSign Api template?
我需要將自定義表單數據附加到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>
您可以使用自定義字段將自定義表單數據附加到HelloSign API模板。 您將要通讀本教程,並密切注意本演練的自定義字段部分: https : //app.hellosign.com/api/templatesAndApiWalkthrough
請記住,將用於自定義字段的文本框設置為“發送時我”,因為這是一個常見錯誤。
您將要使用此端點: https : //app.hellosign.com/api/reference#send_with_template
上面的端點將為您提供帶有模板的非嵌入式簽名請求。
您要進行嵌入式還是非嵌入式 ?
最后,您不需要此端點HelloSign \\ UnclaimedDraft發送帶有模板的簽名請求。 您可以刪除它。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.