【问题标题】:How to append custom form data to HelloSign Api template?如何将自定义表单数据附加到 HelloSign Api 模板?
【发布时间】:2018-06-21 10:02:58
【问题描述】:

我需要将自定义表单数据附加到 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>

【问题讨论】:

  • 你卡在哪里了?您可能想为您的问题提供更多背景信息?
  • 展示你的努力,一些代码,更好地描述。
  • 在您的问题中添加一些代码,以便更清楚。
  • 更新了代码。

标签: php hellosign-api


【解决方案1】:

您可以使用自定义字段将自定义表单数据附加到 HelloSign API 模板。 您将需要完成本教程并密切注意演练的自定义字段部分: https://app.hellosign.com/api/templatesAndApiWalkthrough

请记住将用于自定义字段的文本框设置为“发送时我”,因为这是一个常见错误。

你会想要使用这个端点: https://app.hellosign.com/api/reference#send_with_template

上面的端点会给你一个带有模板的非嵌入式签名请求。

你想做embedded or non-embedded吗?

最后,您不需要此端点 HelloSign\UnclaimedDraft 来发送带有模板的签名请求。你可以删除它。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-06-30
    • 1970-01-01
    • 2012-10-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多