I need to append the custom form data to HelloSign api template. The form filled php form before the HelloSign page. I need to fetch all the details of the form data to display in the HelloSign template.
<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>